public function GenerateProducts::__construct in Commerce Bulk 8
Constructs a new GenerateProducts object.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
array $plugin_definition: The plugin definition.
\Drupal\Core\Entity\EntityStorageInterface $store_storage: The store storage.
\Drupal\Core\Entity\EntityStorageInterface $product_storage: The product storage.
\Drupal\Core\Entity\EntityStorageInterface $product_type_storage: The product type storage.
\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.
\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator service.
\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.
\Drupal\commerce_bulk\BulkVariationsCreatorInterface $variations_creator: The variations creator service.
File
- modules/
commerce_generate/ src/ Plugin/ DevelGenerate/ GenerateProducts.php, line 125
Class
- GenerateProducts
- Provides a GenerateProducts plugin.
Namespace
Drupal\commerce_generate\Plugin\DevelGenerateCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityStorageInterface $store_storage, EntityStorageInterface $product_storage, EntityStorageInterface $product_type_storage, LanguageManagerInterface $language_manager, UrlGeneratorInterface $url_generator, DateFormatterInterface $date_formatter, BulkVariationsCreatorInterface $variations_creator) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->storeStorage = $store_storage;
$this->productStorage = $product_storage;
$this->productTypeStorage = $product_type_storage;
$this->languageManager = $language_manager;
$this->urlGenerator = $url_generator;
$this->dateFormatter = $date_formatter;
$this->creator = $variations_creator;
}