X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FLayout%2FLayoutPluginManager.php;h=a5a465293775b4b75c7d84899d44bcba1f28eb3a;hp=179d1ede9ab7392aaaae32c3d08a7875131d3f4b;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php b/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php index 179d1ede9..a5a465293 100644 --- a/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php +++ b/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php @@ -12,12 +12,15 @@ use Drupal\Core\Plugin\Discovery\AnnotatedClassDiscovery; 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. * @@ -42,8 +45,16 @@ class LayoutPluginManager extends DefaultPluginManager implements LayoutPluginMa 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'; } /**