You are here

public function GenericDeriver::getDerivativeDefinitions in Drupal 7 to 8/9 Module Upgrader 8

Gets the definition of all derivatives of a base plugin.

Parameters

array $base_plugin_definition: The definition array of the base plugin.

Return value

array An array of full derivative definitions keyed on derivative id.

Overrides DeriverInterface::getDerivativeDefinitions

See also

getDerivativeDefinition()

1 call to GenericDeriver::getDerivativeDefinitions()
GenericDeriver::getDerivativeDefinition in src/Plugin/DMU/Rewriter/GenericDeriver.php
Gets the definition of a derivative plugin.

File

src/Plugin/DMU/Rewriter/GenericDeriver.php, line 46

Class

GenericDeriver
Builds derivative definitions for the generic rewriter, based on the drupalmoduleupgrader.rewriters configuration object.

Namespace

Drupal\drupalmoduleupgrader\Plugin\DMU\Rewriter

Code

public function getDerivativeDefinitions($base_definition) {
  $derivatives = [];
  foreach ($this->config as $data_type => $definition) {
    $derivatives[$data_type] = $definition + $base_definition;
  }
  return $derivatives;
}