diff --git a/core/lib/Drupal/Component/Plugin/Discovery/DefaultsDecorator.php b/core/lib/Drupal/Component/Plugin/Discovery/DefaultsDecorator.php index 33aec23..401031a 100644 --- a/core/lib/Drupal/Component/Plugin/Discovery/DefaultsDecorator.php +++ b/core/lib/Drupal/Component/Plugin/Discovery/DefaultsDecorator.php @@ -31,13 +31,12 @@ class DefaultsDecorator implements DiscoveryInterface { /** * Constructs a DefaultsDecorator object. * - * @param DiscoveryInterface $discovery + * @param \Drupal\Component\Plugin\Discovery\DiscoveryInterface $discovery * The parent object implementing DiscoveryInterface that is being * decorated. * @param array $defaults - * An array of defaults that will be added to each plugin definition. For - * nested arrays, each array level is merged using - * \Drupal\Component\Utility\NestedArray::mergeDeep(). + * An array of defaults that will be merged onto each plugin definition + * using \Drupal\Component\Utility\NestedArray::mergeDeep(). */ public function __construct(DiscoveryInterface $decorated, $defaults) { $this->decorated = $decorated; @@ -58,7 +57,7 @@ public function getDefinition($plugin_id) { public function getDefinitions() { $definitions = $this->decorated->getDefinitions(); foreach ($definitions as $plugin_id => &$definition) { - $definition = NestedArray::mergeDeep($defaults, $definition); + $definition = NestedArray::mergeDeep($this->defaults, $definition); } return $definitions; }