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

Breadcrumb

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

function ContentEntityDeriver::getDerivativeDefinitions

Overrides DeriverBase::getDerivativeDefinitions

File

core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntityDeriver.php, line 48

Class

ContentEntityDeriver
Deriver for content entity source plugins.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

public function getDerivativeDefinitions($base_plugin_definition) {
    $this->derivatives = [];
    foreach ($this->entityTypeManager
        ->getDefinitions() as $id => $definition) {
        if ($definition instanceof ContentEntityTypeInterface) {
            $this->derivatives[$id] = $base_plugin_definition;
            // Provide entity_type so the source can be used apart from a deriver.
            $this->derivatives[$id]['entity_type'] = $id;
        }
    }
    return parent::getDerivativeDefinitions($base_plugin_definition);
}

API Navigation

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