diff --git a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php index 08aae21..e245874 100644 --- a/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php +++ b/core/lib/Drupal/Component/Plugin/Discovery/DerivativeDiscoveryDecorator.php @@ -65,10 +65,6 @@ public function getDefinitions() { protected function getDerivatives(array $base_plugin_definitions) { $plugin_definitions = array(); foreach ($base_plugin_definitions as $base_plugin_id => $plugin_definition) { - // @todo Remove this check once http://drupal.org/node/1780396 is resolved. - if (!module_exists($plugin_definition['module'])) { - continue; - } $derivative_fetcher = $this->getDerivativeFetcher($base_plugin_id, $plugin_definition); if ($derivative_fetcher) { $derivative_definitions = $derivative_fetcher->getDerivativeDefinitions($plugin_definition); diff --git a/core/modules/block/lib/Drupal/block/Plugin/Derivative/BlockDerivativeDecorator.php b/core/modules/block/lib/Drupal/block/Plugin/Derivative/BlockDerivativeDecorator.php new file mode 100644 index 0000000..a2cfddb --- /dev/null +++ b/core/modules/block/lib/Drupal/block/Plugin/Derivative/BlockDerivativeDecorator.php @@ -0,0 +1,29 @@ +discovery = new AlterDecorator(new DerivativeDiscoveryDecorator(new AnnotatedClassDiscovery('block', 'block')), 'block'); + $this->discovery = new AlterDecorator(new BlockDerivativeDecorator(new AnnotatedClassDiscovery('block', 'block')), 'block'); $this->factory = new DefaultFactory($this); $this->mapper = new ConfigMapper($this); } -} \ No newline at end of file + +}