Loading core/modules/migrate/src/Plugin/migrate/source/EmptySource.php +3 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,9 @@ * field_name: image * @endcode * * This will return a single row containing 'entity_type' and 'field_name' * elements, with values of 'user' and 'image', respectively. * This will return a single row containing 'constants/entity_type' and * 'constants/field_name' elements, with values of 'user' and 'image', * respectively. * * @MigrateSource( * id = "empty", Loading core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +16 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ * (optional table alias). This high_water_property is typically a timestamp * or serial id showing what was the last imported record. Only content with a * higher value will be imported. * - constants: (optional) An array of constants that can be used in the process * pipeline. To use the constant 'foo' as a source value use 'constants/foo'. * * The high_water_property and track_changes are mutually exclusive. * Loading Loading @@ -58,6 +60,20 @@ * migration. This will get converted into a SQL condition that looks like * 'n.changed' or 'changed' if no alias. * * Example: * * @code * source: * plugin: some_source_plugin_name * constants: * - foo: bar * process: * baz: constants/bar * @endcode * * In this example, the constant 'foo' is defined with a value of 'bar'. It is * later used in the process pipeline to set the value of the field baz. * * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\Annotation\MigrateSource * @see \Drupal\migrate\Plugin\MigrateSourceInterface Loading Loading
core/modules/migrate/src/Plugin/migrate/source/EmptySource.php +3 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,9 @@ * field_name: image * @endcode * * This will return a single row containing 'entity_type' and 'field_name' * elements, with values of 'user' and 'image', respectively. * This will return a single row containing 'constants/entity_type' and * 'constants/field_name' elements, with values of 'user' and 'image', * respectively. * * @MigrateSource( * id = "empty", Loading
core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +16 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,8 @@ * (optional table alias). This high_water_property is typically a timestamp * or serial id showing what was the last imported record. Only content with a * higher value will be imported. * - constants: (optional) An array of constants that can be used in the process * pipeline. To use the constant 'foo' as a source value use 'constants/foo'. * * The high_water_property and track_changes are mutually exclusive. * Loading Loading @@ -58,6 +60,20 @@ * migration. This will get converted into a SQL condition that looks like * 'n.changed' or 'changed' if no alias. * * Example: * * @code * source: * plugin: some_source_plugin_name * constants: * - foo: bar * process: * baz: constants/bar * @endcode * * In this example, the constant 'foo' is defined with a value of 'bar'. It is * later used in the process pipeline to set the value of the field baz. * * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\Annotation\MigrateSource * @see \Drupal\migrate\Plugin\MigrateSourceInterface Loading