use Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator;
use Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator;
use Drupal\Core\Layout\Annotation\Layout;
+use Drupal\Core\Plugin\FilteredPluginManagerTrait;
/**
* Provides a plugin manager for layouts.
*/
class LayoutPluginManager extends DefaultPluginManager implements LayoutPluginManagerInterface {
+ use FilteredPluginManagerTrait;
+
/**
* The theme handler.
*
parent::__construct('Plugin/Layout', $namespaces, $module_handler, LayoutInterface::class, Layout::class);
$this->themeHandler = $theme_handler;
- $this->setCacheBackend($cache_backend, 'layout');
- $this->alterInfo('layout');
+ $type = $this->getType();
+ $this->setCacheBackend($cache_backend, $type);
+ $this->alterInfo($type);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getType() {
+ return 'layout';
}
/**