diff --git a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php index 42a5fcc..b8d97b8 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -16,11 +16,13 @@ * The base class for source plugins. * * Available configuration keys: - * - cache_counts: (optional) (boolean) If set cache the source count. - * - skip_count: (optional) (boolean) If set not attempt to count the source. - * - track_changes: (optional) (boolean) If set track changes to incoming data. - * - high_water_property: It is an array of single value (optional table alias) - * which have the high_water_property corresponding to it. + * - cache_counts: (optional) If set cache the source count. + * - skip_count: (optional) If set not attempt to count the source. + * - track_changes: (optional) If set track changes to incoming data. + * - high_water_property: (optional) It is an array of single value (optional + * table alias) which have the high_water_property corresponding to it. + * + * The high_water_property and track_changes are mutually exclusive. * * Example: * @@ -28,22 +30,28 @@ * source: * plugin: some_source_plugin_name * cache_counts: true - * skip_count: true * track_changes: true * @endcode * - * The highwater mark or track changes not should be set at the same time. - * They are both designed to solve the same problem. + * This example uses the plugin "some_source_plugin_name" and caches the count + * of available source records to save calculating every time count() is called. + * Changes to incoming data are watched (because track_changes is true) which + * can affect the result of prepareRow(). * * Example: * * @code * source: * plugin: some_source_plugin_name + * skip_count: true * high_water_property: * name: something * @endcode * + * In this example skip_count is true which means count() will not attempt to + * count the available source records, but just always return -1 instead. The + * high_water_property defines which field marks the progress of the migration. + * * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\Annotation\MigrateSource * @see \Drupal\migrate\Plugin\MigrateSourceInterface