function DrupalSqlBase::calculateDependencies

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::calculateDependencies()
  2. 8.9.x core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::calculateDependencies()
  3. 10 core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::calculateDependencies()

Overrides DependentPluginInterface::calculateDependencies

File

core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php, line 181

Class

DrupalSqlBase
A base class for source plugins using a Drupal database as a source.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

public function calculateDependencies() {
    // Generic handling for Drupal source plugin constants.
    if (isset($this->configuration['constants']['entity_type'])) {
        $this->addDependency('module', $this->entityTypeManager
            ->getDefinition($this->configuration['constants']['entity_type'])
            ->getProvider());
    }
    if (isset($this->configuration['constants']['module'])) {
        $this->addDependency('module', $this->configuration['constants']['module']);
    }
    return $this->dependencies;
}

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