You are here

public function ArrayPluginDefinitionDecorator::mergeOverrideArrayDefinition in Plugin 8.2

Merges another array definition into this one, using the other for overrides.

Parameters

mixed[] $other_definition: The other array definition.

Return value

$this

Overrides ArrayPluginDefinitionInterface::mergeOverrideArrayDefinition

1 call to ArrayPluginDefinitionDecorator::mergeOverrideArrayDefinition()
ArrayPluginDefinitionDecorator::doMergeOverrideDefinition in src/PluginDefinition/ArrayPluginDefinitionDecorator.php
Merges another definition into this one, using the other for overrides.

File

src/PluginDefinition/ArrayPluginDefinitionDecorator.php, line 74

Class

ArrayPluginDefinitionDecorator
Provides a plugin definition based on an array.

Namespace

Drupal\plugin\PluginDefinition

Code

public function mergeOverrideArrayDefinition(array $other_definition) {
  $this->arrayDefinition = NestedArray::mergeDeepArray([
    $this->arrayDefinition,
    $other_definition,
  ], TRUE);
  return $this;
}