function Migration::mergeProcessOfProperty

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::mergeProcessOfProperty()
  2. 8.9.x core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::mergeProcessOfProperty()
  3. 11.x core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::mergeProcessOfProperty()

Merge the process pipeline configuration for a single property.

Parameters

string $property: The property of which to merge the passed in process pipeline configuration.

array $process_of_property: The process pipeline configuration to be merged with the existing process pipeline configuration.

Return value

$this The migration entity.

Overrides MigrationInterface::mergeProcessOfProperty

File

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

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function mergeProcessOfProperty($property, array $process_of_property) {
  // If we already have a process value then merge the incoming process array
  // otherwise simply set it.
  $current_process = $this->getProcess();
  if (isset($current_process[$property])) {
    $this->process = NestedArray::mergeDeepArray([
      $current_process,
      $this->getProcessNormalized([
        $property => $process_of_property,
      ]),
    ], TRUE);
  }
  else {
    $this->setProcessOfProperty($property, $process_of_property);
  }
  return $this;
}

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