function DevelGenerateBase::create

Instantiates a new instance of this class.

8 methods override DevelGenerateBase::create()
BlockContentDevelGenerate::create in devel_generate/src/Plugin/DevelGenerate/BlockContentDevelGenerate.php
Instantiates a new instance of this class.
ContentDevelGenerate::create in devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php
Instantiates a new instance of this class.
ExampleDevelGenerate::create in devel_generate/tests/modules/devel_generate_example/src/Plugin/DevelGenerate/ExampleDevelGenerate.php
Instantiates a new instance of this class.
MediaDevelGenerate::create in devel_generate/src/Plugin/DevelGenerate/MediaDevelGenerate.php
Instantiates a new instance of this class.
MenuDevelGenerate::create in devel_generate/src/Plugin/DevelGenerate/MenuDevelGenerate.php
Instantiates a new instance of this class.

... See full list

File

devel_generate/src/DevelGenerateBase.php, line 58

Class

DevelGenerateBase
Provides a base DevelGenerate plugin implementation.

Namespace

Drupal\devel_generate

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : static {
    $instance = new static($configuration, $plugin_id, $plugin_definition);
    $instance->entityTypeManager = $container->get('entity_type.manager');
    $instance->languageManager = $container->get('language_manager');
    $instance->moduleHandler = $container->get('module_handler');
    $instance->stringTranslation = $container->get('string_translation');
    $instance->entityFieldManager = $container->get('entity_field.manager');
    $instance->setMessenger($container->get('messenger'));
    return $instance;
}