You are here

public function DestinationBase::getDestinationModule in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php \Drupal\migrate\Plugin\migrate\destination\DestinationBase::getDestinationModule()
  2. 9 core/modules/migrate/src/Plugin/migrate/destination/DestinationBase.php \Drupal\migrate\Plugin\migrate\destination\DestinationBase::getDestinationModule()

Gets the destination module handling the destination data.

Return value

string|null The destination module or NULL if not found.

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 123

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