You are here

protected function Migration::getProcessNormalized in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getProcessNormalized()
  2. 10 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::getProcessNormalized()

Resolve shorthands into a list of plugin configurations.

Parameters

array $process: A process configuration array.

Return value

array The normalized process configuration.

4 calls to Migration::getProcessNormalized()
Migration::findMigrationDependencies in core/modules/migrate/src/Plugin/Migration.php
Find migration dependencies from migration_lookup and sub_process plugins.
Migration::getProcess in core/modules/migrate/src/Plugin/Migration.php
Get the normalized process pipeline configuration describing the process plugins.
Migration::getProcessPlugins in core/modules/migrate/src/Plugin/Migration.php
Returns the process plugins.
Migration::mergeProcessOfProperty in core/modules/migrate/src/Plugin/Migration.php
Merge the process pipeline configuration for a single property.

File

core/modules/migrate/src/Plugin/Migration.php, line 396

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

protected function getProcessNormalized(array $process) {
  $normalized_configurations = [];
  foreach ($process as $destination => $configuration) {
    if (is_string($configuration)) {
      $configuration = [
        'plugin' => 'get',
        'source' => $configuration,
      ];
    }
    if (isset($configuration['plugin'])) {
      $configuration = [
        $configuration,
      ];
    }
    if (!is_array($configuration)) {
      $migration_id = $this
        ->getPluginId();
      throw new MigrateException("Invalid process for destination '{$destination}' in migration '{$migration_id}'");
    }
    $normalized_configurations[$destination] = $configuration;
  }
  return $normalized_configurations;
}