You are here

public function MigrateEntityComplete::getDerivativeDefinitions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/Derivative/MigrateEntityComplete.php \Drupal\migrate\Plugin\Derivative\MigrateEntityComplete::getDerivativeDefinitions()
  2. 10 core/modules/migrate/src/Plugin/Derivative/MigrateEntityComplete.php \Drupal\migrate\Plugin\Derivative\MigrateEntityComplete::getDerivativeDefinitions()

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 MigrateEntity::getDerivativeDefinitions

See also

getDerivativeDefinition()

File

core/modules/migrate/src/Plugin/Derivative/MigrateEntityComplete.php, line 15

Class

MigrateEntityComplete
Deriver for entity_complete:ENTITY_TYPE entity migrations.

Namespace

Drupal\migrate\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  foreach ($this->entityDefinitions as $entity_type => $entity_info) {
    $this->derivatives[$entity_type] = [
      'id' => "entity_complete:{$entity_type}",
      'class' => EntityContentComplete::class,
      'requirements_met' => 1,
      'provider' => $entity_info
        ->getProvider(),
    ];
  }
  return $this->derivatives;
}