public function Migration::mergeProcessOfProperty in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/src/Plugin/Migration.php \Drupal\migrate\Plugin\Migration::mergeProcessOfProperty()
- 10 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 577
Class
- Migration
- Defines the Migration plugin.
Namespace
Drupal\migrate\PluginCode
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;
}