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

Breadcrumb

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

function D6TermNodeDeriver::getDerivativeDefinitions

Overrides DeriverBase::getDerivativeDefinitions

File

core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php, line 57

Class

D6TermNodeDeriver
Deriver for Drupal 6 term node migrations based on vocabularies.

Namespace

Drupal\taxonomy\Plugin\migrate

Code

public function getDerivativeDefinitions($base_plugin_definition, $base_plugin_definitions = NULL) {
    try {
        foreach (static::getSourcePlugin('d6_taxonomy_vocabulary') as $row) {
            $source_vid = $row->getSourceProperty('vid');
            $definition = $base_plugin_definition;
            $definition['source']['vid'] = $source_vid;
            // migrate_drupal_migration_plugins_alter() adds to this definition.
            $this->derivatives[$source_vid] = $definition;
        }
    } catch (\Exception) {
        // It is possible no D6 tables are loaded so just eat exceptions.
    }
    return $this->derivatives;
}

API Navigation

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