public function BulkVariationsCreatorInterface::getAttributesCombinations in Commerce Bulk 8
Gets all ids combinations of the commerce_product's attribute fields.
Parameters
array $variations: The commerce product variations.
array $return: (optional) Whether to return all attributes combinations or just ~ 500.
Return value
array|null An array of used combinations, not used combinations and their number, last variation, variation attributes ids and options:
- "last_variation": The variation on the last inline entity form array.
- "used_combinations": The already used combinations.
- "not_used_combinations": Yet not used combinations.
- "count": The number of all combinations.
- "attributes": An array with attributes ids and options:
- "ids": The array of field_name => id pairs.
- "options": The array of id => field_label pairs.
- "duplicated": The number of duplicated combinations.
- "used": The number of used combinations.
- "not_all": The maximum number of combinations to return.
1 method overrides BulkVariationsCreatorInterface::getAttributesCombinations()
- BulkVariationsCreator::getAttributesCombinations in src/
BulkVariationsCreator.php - Gets all ids combinations of the commerce_product's attribute fields.
File
- src/
BulkVariationsCreatorInterface.php, line 271
Class
- BulkVariationsCreatorInterface
- Manages variation combinations creation.
Namespace
Drupal\commerce_bulkCode
public function getAttributesCombinations(array $variations, array $return = [
'not_all' => 500,
]);