function DestinationBase::getDestinationModule

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php \Drupal\migrate\Plugin\migrate\destination\DestinationBase::getDestinationModule()
  2. 10 core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php \Drupal\migrate\Plugin\migrate\destination\DestinationBase::getDestinationModule()
  3. 11.x core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php \Drupal\migrate\Plugin\migrate\destination\DestinationBase::getDestinationModule()

Overrides MigrateDestinationInterface::getDestinationModule

1 method overrides DestinationBase::getDestinationModule()
Config::getDestinationModule in core/modules/migrate/src/Plugin/migrate/destination/Config.php
Gets the destination module handling the destination data.

File

core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php, line 121

Class

DestinationBase
Base class for migrate destination classes.

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

public function getDestinationModule() {
    if (!empty($this->configuration['destination_module'])) {
        return $this->configuration['destination_module'];
    }
    if (!empty($this->pluginDefinition['destination_module'])) {
        return $this->pluginDefinition['destination_module'];
    }
    if (is_string($this->migration->provider)) {
        return $this->migration->provider;
    }
    else {
        return reset($this->migration->provider);
    }
}

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