Chris@0: themeHandler = $theme_handler; Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public static function create(ContainerInterface $container, $base_plugin_id) { Chris@0: return new static( Chris@0: $container->get('theme_handler') Chris@0: ); Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getDerivativeDefinitions($base_plugin_definition) { Chris@0: foreach ($this->themeHandler->listInfo() as $theme_name => $theme) { Chris@0: if ($this->themeHandler->hasUi($theme_name)) { Chris@0: $this->derivatives[$theme_name] = $base_plugin_definition; Chris@0: $this->derivatives[$theme_name]['title'] = $theme->info['name']; Chris@0: $this->derivatives[$theme_name]['route_parameters'] = ['theme' => $theme_name]; Chris@0: } Chris@0: } Chris@0: return $this->derivatives; Chris@0: } Chris@0: Chris@0: }