Commit 5ba91c71 authored by catch's avatar catch

Issue #2105555 by Bladedu: Plugins cache prefix names not consistent between plugin managers.

parent 7c219bbf
......@@ -33,7 +33,7 @@ class ArchiverManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Archiver', $namespaces);
$this->alterInfo($module_handler, 'archiver_info');
$this->setCacheBackend($cache_backend, $language_manager, 'archiver_info');
$this->setCacheBackend($cache_backend, $language_manager, 'archiver_info_plugins');
}
/**
......
......@@ -34,7 +34,7 @@ class ConditionManager extends DefaultPluginManager implements ExecutableManager
*/
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
$this->alterInfo($module_handler, 'condition_info');
$this->setCacheBackend($cache_backend, $language_manager, 'condition');
$this->setCacheBackend($cache_backend, $language_manager, 'condition_plugins');
parent::__construct('Plugin/Condition', $namespaces, 'Drupal\Core\Condition\Annotation\Condition');
}
......
......@@ -43,7 +43,7 @@ class FieldTypePluginManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/field/field_type', $namespaces, 'Drupal\Core\Entity\Annotation\FieldType');
$this->alterInfo($module_handler, 'field_info');
$this->setCacheBackend($cache_backend, $language_manager, 'field_types');
$this->setCacheBackend($cache_backend, $language_manager, 'field_types_plugins');
// @todo Remove once all core field types have been converted (see
// http://drupal.org/node/2014671).
......
......@@ -40,7 +40,7 @@ class ImageToolkitManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ConfigFactory $config_factory) {
parent::__construct('Plugin/ImageToolkit', $namespaces, 'Drupal\Core\ImageToolkit\Annotation\ImageToolkit');
$this->setCacheBackend($cache_backend, $language_manager, 'image_toolkit');
$this->setCacheBackend($cache_backend, $language_manager, 'image_toolkit_plugins');
$this->configFactory = $config_factory;
}
......
......@@ -115,7 +115,7 @@ public function __construct(ControllerResolverInterface $controller_resolver, Re
$this->routeProvider = $route_provider;
$this->accessManager = $access_manager;
$this->alterInfo($module_handler, 'local_tasks');
$this->setCacheBackend($cache, $language_manager, 'local_task', array('local_task' => TRUE));
$this->setCacheBackend($cache, $language_manager, 'local_task_plugins', array('local_task' => TRUE));
}
/**
......
......@@ -46,7 +46,7 @@ class TypedDataManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
$this->alterInfo($module_handler, 'data_type_info');
$this->setCacheBackend($cache_backend, $language_manager, 'typed_data:types');
$this->setCacheBackend($cache_backend, $language_manager, 'typed_data_types_plugins');
parent::__construct('Plugin/DataType', $namespaces, 'Drupal\Core\TypedData\Annotation\DataType');
}
......
......@@ -50,7 +50,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
parent::__construct('Plugin/Validation/Constraint', $namespaces);
$this->discovery = new StaticDiscoveryDecorator($this->discovery, array($this, 'registerDefinitions'));
$this->alterInfo($module_handler, 'validation_constraint');
$this->setCacheBackend($cache_backend, $language_manager, 'validation_constraint');
$this->setCacheBackend($cache_backend, $language_manager, 'validation_constraint_plugins');
}
/**
......
......@@ -37,7 +37,7 @@ public function __construct($type, \Traversable $namespaces, CacheBackendInterfa
);
parent::__construct("Plugin/aggregator/$type", $namespaces, $type_annotations[$type]);
$this->setCacheBackend($cache_backend, $language_manager, "aggregator_$type");
$this->setCacheBackend($cache_backend, $language_manager, 'aggregator_' . $type . '_plugins');
}
}
......@@ -35,7 +35,7 @@ class CKEditorPluginManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/CKEditorPlugin', $namespaces, 'Drupal\ckeditor\Annotation\CKEditorPlugin');
$this->alterInfo($module_handler, 'ckeditor_plugin_info');
$this->setCacheBackend($cache_backend, $language_manager, 'ckeditor_plugin');
$this->setCacheBackend($cache_backend, $language_manager, 'ckeditor_plugins');
}
/**
......
......@@ -33,7 +33,7 @@ class EditorManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Editor', $namespaces, 'Drupal\editor\Annotation\Editor');
$this->alterInfo($module_handler, 'editor_info');
$this->setCacheBackend($cache_backend, $language_manager, 'editor');
$this->setCacheBackend($cache_backend, $language_manager, 'editor_plugins');
}
/**
......
......@@ -34,7 +34,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
$this->factory = new ReflectionFactory($this);
$this->alterInfo($module_handler, 'entity_reference_selection');
$this->setCacheBackend($cache_backend, $language_manager, 'entity_reference_selection');
$this->setCacheBackend($cache_backend, $language_manager, 'entity_reference_selection_plugins');
}
/**
......
......@@ -52,7 +52,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
parent::__construct('Plugin/field/formatter', $namespaces, 'Drupal\field\Annotation\FieldFormatter');
$this->setCacheBackend($cache_backend, $language_manager, 'field_formatter_types');
$this->setCacheBackend($cache_backend, $language_manager, 'field_formatter_types_plugins');
$this->alterInfo($module_handler, 'field_formatter_info');
$this->fieldTypeManager = $field_type_manager;
}
......
......@@ -51,7 +51,7 @@ class WidgetPluginManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, LanguageManager $language_manager, FieldTypePluginManager $field_type_manager) {
parent::__construct('Plugin/field/widget', $namespaces, 'Drupal\field\Annotation\FieldWidget');
$this->setCacheBackend($cache_backend, $language_manager, 'field_widget_types');
$this->setCacheBackend($cache_backend, $language_manager, 'field_widget_types_plugins');
$this->alterInfo($module_handler, 'field_widget_info');
$this->factory = new WidgetFactory($this);
......
......@@ -24,7 +24,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
parent::__construct('Plugin/ImageEffect', $namespaces, 'Drupal\image\Annotation\ImageEffect');
$this->alterInfo($module_handler, 'image_effect_info');
$this->setCacheBackend($cache_backend, $language_manager, 'image_effect');
$this->setCacheBackend($cache_backend, $language_manager, 'image_effect_plugins');
}
}
......@@ -34,7 +34,7 @@ public function __construct(\Traversable $namespaces, CacheBackendInterface $cac
parent::__construct('Plugin/tour/tip', $namespaces, 'Drupal\tour\Annotation\Tip');
$this->alterInfo($module_handler, 'tour_tips_info');
$this->setCacheBackend($cache_backend, $language_manager, 'tour');
$this->setCacheBackend($cache_backend, $language_manager, 'tour_plugins');
}
}
......@@ -44,7 +44,7 @@ public function __construct($type, \Traversable $namespaces, CacheBackendInterfa
);
$this->alterInfo($module_handler, 'views_plugins_' . $type);
$this->setCacheBackend($cache_backend, $language_manager, 'views:' . $type);
$this->setCacheBackend($cache_backend, $language_manager, 'views_' . $type . '_plugins');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment