function SubProcess::transformKey

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/process/SubProcess.php \Drupal\migrate\Plugin\migrate\process\SubProcess::transformKey()
  2. 8.9.x core/modules/migrate/src/Plugin/migrate/process/SubProcess.php \Drupal\migrate\Plugin\migrate\process\SubProcess::transformKey()
  3. 11.x core/modules/migrate/src/Plugin/migrate/process/SubProcess.php \Drupal\migrate\Plugin\migrate\process\SubProcess::transformKey()

Runs the process pipeline for the key to determine its dynamic name.

Parameters

string|int $key: The current key.

\Drupal\migrate\MigrateExecutableInterface $migrate_executable: The migrate executable helper class.

\Drupal\migrate\Row $row: The current row after processing.

Return value

mixed The transformed key.

1 call to SubProcess::transformKey()
SubProcess::transform in core/modules/migrate/src/Plugin/migrate/process/SubProcess.php
Performs the associated process.

File

core/modules/migrate/src/Plugin/migrate/process/SubProcess.php, line 246

Class

SubProcess
Runs an array of arrays through its own process pipeline.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

protected function transformKey($key, MigrateExecutableInterface $migrate_executable, Row $row) {
    $process = [
        'key' => $this->configuration['key'],
    ];
    $migrate_executable->processRow($row, $process, $key);
    return $row->getDestinationProperty('key');
}

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