function VocabularyDevelGenerate::create

Same name in other branches
  1. 4.x devel_generate/src/Plugin/DevelGenerate/VocabularyDevelGenerate.php \Drupal\devel_generate\Plugin\DevelGenerate\VocabularyDevelGenerate::create()

Overrides DevelGenerateBase::create

File

devel_generate/src/Plugin/DevelGenerate/VocabularyDevelGenerate.php, line 41

Class

VocabularyDevelGenerate
Provides a VocabularyDevelGenerate plugin.

Namespace

Drupal\devel_generate\Plugin\DevelGenerate

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) : static {
    $entity_type_manager = $container->get('entity_type.manager');
    $instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
    $instance->vocabularyStorage = $entity_type_manager->getStorage('taxonomy_vocabulary');
    return $instance;
}