diff --git a/core/modules/migrate/src/Entity/Migration.php b/core/modules/migrate/src/Entity/Migration.php index 8a9ec77..3143b62 100644 --- a/core/modules/migrate/src/Entity/Migration.php +++ b/core/modules/migrate/src/Entity/Migration.php @@ -410,23 +410,23 @@ public function setProcess(array $process) { /** * {@inheritdoc} */ - public function setProcessOfProperty($field_name, $process_of_property) { - $this->process[$field_name] = $process_of_property; + public function setProcessOfProperty($property, $process_of_property) { + $this->process[$property] = $process_of_property; return $this; } /** * {@inheritdoc} */ - public function mergeProcessOfProperty($field_name, array $process) { + 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[$field_name])) { - $this->process = NestedArray::mergeDeepArray([$current_process, $this->getProcessNormalized([$field_name => $process])], TRUE); + if (isset($current_process[$property])) { + $this->process = NestedArray::mergeDeepArray([$current_process, $this->getProcessNormalized([$property => $process_of_property])], TRUE); } else { - $this->setProcessOfProperty($field_name, $process); + $this->setProcessOfProperty($property, $process_of_property); } return $this; diff --git a/core/modules/migrate/src/Entity/MigrationInterface.php b/core/modules/migrate/src/Entity/MigrationInterface.php index a03f583..bce1854 100644 --- a/core/modules/migrate/src/Entity/MigrationInterface.php +++ b/core/modules/migrate/src/Entity/MigrationInterface.php @@ -180,7 +180,8 @@ public function setMigrationResult($result); public function getMigrationResult(); /** - * Get the normalized process configuration describing the process plugins. + * Get the normalized process pipeline configuration describing the process + * plugins. * * The process configuration is always normalized. All shorthand processing * will be expanded into their full representations. @@ -193,47 +194,49 @@ public function getMigrationResult(); public function getProcess(); /** - * Set the entire process configuration describing the process plugins. + * Allows you to override the entire process configuration. * * @param array $process - * The configuration describing the process plugins. + * The entire process pipeline configuration describing the process plugins. * * @return $this */ public function setProcess(array $process); /** - * Set the process for an individual destination field. + * Set the process pipeline configuration for an individual destination field. * - * This method allows you to set the processing for an individual destination - * field within the full process configuration. + * This method allows you to set the process pipeline configuration for a + * single property within the full process pipeline configuration. * - * @param string $field_name - * The field name of which to set the process. + * @param string $property + * The property of which to set the process pipeline configuration. * @param mixed $process_of_property - * A valid process value, array or string. + * The process pipeline configuration to be set for this property. * * @return $this * The migration entity. * * @see Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity::processLinkField(). */ - public function setProcessOfProperty($field_name, $process_of_property); + public function setProcessOfProperty($property, $process_of_property); /** - * Merge the process arrays for an individual field. + * Merge the process pipeline configuration for a single property. * - * @param string $field_name - * The field name of which to merge the process. - * @param array $process - * An array of process data to be merged. + * @param string $property + * The property of which to merge the passed in process pipeline + * configuration. + * @param array $process_of_property + * The process pipeline configuration to be merged with the existing process + * pipeline configuration. * * @return $this * The migration entity. * * @see Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity::processLinkField(). */ - public function mergeProcessOfProperty($field_name, array $process); + public function mergeProcessOfProperty($property, array $process_of_property); /** * Get the current system of record of the migration.