You are here

public function ContentDevelGenerate::__construct in Devel 8.2

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

The construct.

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 implementation definition.

\Drupal\Core\Entity\EntityStorageInterface $node_storage: The node storage.

\Drupal\Core\Entity\EntityStorageInterface $node_type_storage: The node type storage.

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

\Drupal\comment\CommentManagerInterface $comment_manager: The comment manager service.

\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\Core\Datetime\Time $time: Provides system time.

Overrides PluginBase::__construct

File

devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php, line 129

Class

ContentDevelGenerate
Provides a ContentDevelGenerate plugin.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityStorageInterface $node_storage, EntityStorageInterface $node_type_storage, ModuleHandlerInterface $module_handler, CommentManagerInterface $comment_manager = NULL, LanguageManagerInterface $language_manager, UrlGeneratorInterface $url_generator, DateFormatterInterface $date_formatter, Time $time) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->moduleHandler = $module_handler;
  $this->nodeStorage = $node_storage;
  $this->nodeTypeStorage = $node_type_storage;
  $this->commentManager = $comment_manager;
  $this->languageManager = $language_manager;
  $this->urlGenerator = $url_generator;
  $this->dateFormatter = $date_formatter;
  $this->time = $time;
}