diff --git a/core/modules/migrate/src/Plugin/migrate/source/EmbeddedDataSource.php b/core/modules/migrate/src/Plugin/migrate/source/EmbeddedDataSource.php index 05be56da8ba49e205d0c3d4c2116e0abafda844e..0bb35f3e24bb53c48554fc11c7151d21dd6d06d1 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/EmbeddedDataSource.php +++ b/core/modules/migrate/src/Plugin/migrate/source/EmbeddedDataSource.php @@ -1,10 +1,41 @@ <?php namespace Drupal\migrate\Plugin\migrate\source; + use Drupal\migrate\Plugin\MigrationInterface; /** - * Source which takes its data directly from the plugin config. + * Allows source data to be defined in the configuration of the source plugin. + * + * The embedded_data source plugin is used to inject source data from the plugin + * configuration. One use case is when some small amount of fixed data is + * imported, so that it can be referenced by other migrations. Another use case + * is testing. + * + * Available configuration keys + * - data_rows: The source data array. + * - ids: The unique ID field of the data. + * + * Examples: + * + * @code + * source: + * plugin: embedded_data + * data_rows: + * - + * channel_machine_name: music + * channel_description: Music + * - + * channel_machine_name: movies + * channel_description: Movies + * ids: + * channel_machine_name: + * type: string + * @endcode + * + * This example migrates a channel vocabulary. + * + * @see \Drupal\migrate\Plugin\MigrateSourceInterface * * @MigrateSource( * id = "embedded_data"