function MigrateEntity::getDerivativeDefinitions

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php \Drupal\migrate\Plugin\Derivative\MigrateEntity::getDerivativeDefinitions()
  2. 8.9.x core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php \Drupal\migrate\Plugin\Derivative\MigrateEntity::getDerivativeDefinitions()
  3. 11.x core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php \Drupal\migrate\Plugin\Derivative\MigrateEntity::getDerivativeDefinitions()

Overrides DeriverInterface::getDerivativeDefinitions

1 call to MigrateEntity::getDerivativeDefinitions()
MigrateEntity::getDerivativeDefinition in core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php
1 method overrides MigrateEntity::getDerivativeDefinitions()
MigrateEntityComplete::getDerivativeDefinitions in core/modules/migrate/src/Plugin/Derivative/MigrateEntityComplete.php

File

core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php, line 57

Class

MigrateEntity

Namespace

Drupal\migrate\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
    foreach ($this->entityDefinitions as $entity_type => $entity_info) {
        $class = is_subclass_of($entity_info->getClass(), 'Drupal\\Core\\Config\\Entity\\ConfigEntityInterface') ? 'Drupal\\migrate\\Plugin\\migrate\\destination\\EntityConfigBase' : 'Drupal\\migrate\\Plugin\\migrate\\destination\\EntityContentBase';
        $this->derivatives[$entity_type] = [
            'id' => "entity:{$entity_type}",
            'class' => $class,
            'requirements_met' => 1,
            'provider' => $entity_info->getProvider(),
        ];
    }
    return $this->derivatives;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.