diff --git a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php index 8d69418262..bb4c9bfadf 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -333,9 +333,20 @@ public function rewind() { /** * {@inheritdoc} * - * The migration iterates over rows returned by the source plugin. This - * method determines the next row which will be processed and imported into - * the system. + * The migration iterates over rows returned by the source plugin. For each + * row, the map row, if it exists is deleted and then the prepareRow method + * and hook_prepare_row are executed. The next step is to determine if the row + * will be processed. + * A row will be processed in any of these cases: + * - the row has not already been imported + * - the row needs an update + * - the row is above the highwater mark + * - the source row has changed + * A row is considered changed only if track_changes is set on the source + * plugin and the source values for the row have changed since the last + * import. When set to be processed, the row is also marked frozen and no + * further changes to the row source properties are allowed. The last + * step is to set the highwater value, if highwater is in use. * * The method tracks the source and destination IDs using the ID map plugin. * diff --git a/core/modules/migrate/src/Row.php b/core/modules/migrate/src/Row.php index 08f41ba33e..6b6f1ad9d0 100644 --- a/core/modules/migrate/src/Row.php +++ b/core/modules/migrate/src/Row.php @@ -167,7 +167,7 @@ public function getSource() { } /** - * Sets a source property. + * Sets a source property if the row is not frozen. * * This can only be called from the source plugin. * @@ -177,6 +177,8 @@ public function getSource() { * The property value to set on the source. * * @throws \Exception + * + * @see \Drupal\migrate\Plugin\migrate\source\SourcePluginBase::next */ public function setSourceProperty($property, $data) { if ($this->frozen) {