'', // The {{ plugin_type }} label. 'label' => '', // The {{ plugin_type }} description. 'description' => '', // Default plugin class. 'class' => {{ class_prefix }}Default::class, ]; /** * Constructs {{ class_prefix }}PluginManager object. */ public function __construct(ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend) { $this->factory = new ContainerFactory($this); $this->moduleHandler = $module_handler; $this->alterInfo('{{ plugin_type }}_info'); $this->setCacheBackend($cache_backend, '{{ plugin_type }}_plugins'); } /** * {@inheritdoc} */ protected function getDiscovery(): HookDiscovery { if (!isset($this->discovery)) { $this->discovery = new HookDiscovery($this->moduleHandler, '{{ plugin_type }}_info'); } return $this->discovery; } }