You are here

public function TermDevelGenerate::__construct in Devel 4.x

Same name and namespace in other branches
  1. 8.3 devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\TermDevelGenerate::__construct()
  2. 8 devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\TermDevelGenerate::__construct()
  3. 8.2 devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\TermDevelGenerate::__construct()

Constructs a new TermDevelGenerate object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Entity\EntityStorageInterface $vocabulary_storage: The vocabulary storage.

\Drupal\Core\Entity\EntityStorageInterface $term_storage: The term storage.

\Drupal\Core\Database\Connection $database: Database connection.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\content_translation\ContentTranslationManagerInterface $content_translation_manager: The content translation manager service.

Overrides PluginBase::__construct

File

devel_generate/src/Plugin/DevelGenerate/TermDevelGenerate.php, line 102

Class

TermDevelGenerate
Provides a TermDevelGenerate plugin.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityStorageInterface $vocabulary_storage, EntityStorageInterface $term_storage, Connection $database, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, ContentTranslationManagerInterface $content_translation_manager = NULL) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->vocabularyStorage = $vocabulary_storage;
  $this->termStorage = $term_storage;
  $this->database = $database;
  $this->moduleHandler = $module_handler;
  $this->languageManager = $language_manager;
  $this->contentTranslationManager = $content_translation_manager;
}