function Migration::mergeProcessOfProperty

Same name 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. 10 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::mergeProcessOfProperty()

Overrides MigrationInterface::mergeProcessOfProperty

File

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

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.