public function BulkVariationsCreatorInterface::createAllProductVariations in Commerce Bulk 8
Creates all possible variations for commerce_product.
Parameters
\Drupal\commerce_product\Entity\Product $product: A commerce product, whether new or having some variations saved on it.
array $variation_custom_values: (optional) An associative array of a variation property values which will be used to auto create all variations.
array $all: (optional) An associative array of variations combinations that will be to auto create all variations.
Return value
array|null An array of all commerce product variations that were missed before.
See also
\Drupal\commerce_product\Entity\Product->getVariations()
self->getAllAttributesCombinations()
1 method overrides BulkVariationsCreatorInterface::createAllProductVariations()
- BulkVariationsCreator::createAllProductVariations in src/
BulkVariationsCreator.php - Creates all possible variations for commerce_product.
File
- src/
BulkVariationsCreatorInterface.php, line 154
Class
- BulkVariationsCreatorInterface
- Manages variation combinations creation.
Namespace
Drupal\commerce_bulkCode
public function createAllProductVariations(Product $product, array $variation_custom_values = [], array $all = []);