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

Breadcrumb

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

function Config::getDestinationModule

Overrides DestinationBase::getDestinationModule

File

core/modules/migrate/src/Plugin/migrate/destination/Config.php, line 222

Class

Config
Provides Configuration Management destination plugin.

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'];
    }
    // Config translations require the config_translation module so set the
    // migration provider to 'config_translation'. The corresponding non
    // translated configuration is expected to be handled in a separate
    // migration.
    if (isset($this->configuration['translations'])) {
        return 'config_translation';
    }
    // Get the module handling this configuration object from the config_name,
    // which is of the form <module_name>.<configuration object name>
    return !empty($this->configuration['config_name']) ? explode('.', $this->configuration['config_name'], 2)[0] : NULL;
}
RSS feed
Powered by Drupal