diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index 898503f..b935181 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1881,6 +1881,7 @@ public static function viewsHandlerTypes() { * An array of plugin type strings. */ public static function getPluginTypes() { + // As this is used during container building, this must be constant. return array( 'access', 'area', diff --git a/core/modules/views/lib/Drupal/views/ViewsBundle.php b/core/modules/views/lib/Drupal/views/ViewsBundle.php index 0b18d3f..393851e 100644 --- a/core/modules/views/lib/Drupal/views/ViewsBundle.php +++ b/core/modules/views/lib/Drupal/views/ViewsBundle.php @@ -21,6 +21,7 @@ class ViewsBundle extends Bundle { * Overrides Symfony\Component\HttpKernel\Bundle\Bundle::build(). */ public function build(ContainerBuilder $container) { + // This is working only because getPluginTypes wraps a constant array. foreach (ViewExecutable::getPluginTypes() as $type) { $container->register("plugin.manager.views.$type", 'Drupal\views\Plugin\ViewsPluginManager') ->addArgument($type)