Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MigrateEntity.php

function MigrateEntity::getDerivativeDefinitions

Overrides DeriverInterface::getDerivativeDefinitions

1 call to MigrateEntity::getDerivativeDefinitions()
MigrateEntity::getDerivativeDefinition in core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php
Gets the definition of a derivative plugin.
1 method overrides MigrateEntity::getDerivativeDefinitions()
MigrateEntityComplete::getDerivativeDefinitions in core/modules/migrate/src/Plugin/Derivative/MigrateEntityComplete.php
Gets the definition of all derivatives of a base plugin.

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal