You are here

public function ArrayPluginDefinitionDecorator::mergeDefaultArrayDefinition in Plugin 8.2

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

Parameters

mixed[] $other_definition: The other array definition.

Return value

$this

Overrides ArrayPluginDefinitionInterface::mergeDefaultArrayDefinition

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

File

src/PluginDefinition/ArrayPluginDefinitionDecorator.php, line 65

Class

ArrayPluginDefinitionDecorator
Provides a plugin definition based on an array.

Namespace

Drupal\plugin\PluginDefinition

Code

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