X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2FEmptySource.php;h=09f8a95792b4a8825b7e03f1a1fb858dbae1fe2f;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=2391b0a2514b902daabec46ed3798412b65be2cb;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php b/web/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php index 2391b0a25..09f8a9579 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php +++ b/web/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php @@ -3,9 +3,20 @@ namespace Drupal\migrate\Plugin\migrate\source; /** - * Source returning an empty row. + * Source returning a row based on the constants provided. * - * This is generally useful when needing to create a field using a migration.. + * Example: + * + * @code + * source: + * plugin: empty + * constants: + * entity_type: user + * field_name: image + * @endcode + * + * This will return a single row containing 'entity_type' and 'field_name' + * elements, with values of 'user' and 'image', respectively. * * @MigrateSource( * id = "empty" @@ -47,7 +58,7 @@ class EmptySource extends SourcePluginBase { /** * {@inheritdoc} */ - public function count() { + public function count($refresh = FALSE) { return 1; }