Pull merge.
[yaffs-website] / web / core / modules / migrate / src / Plugin / migrate / source / EmptySource.php
index 2391b0a2514b902daabec46ed3798412b65be2cb..c3add91a6b791b59572ef9ce44820794278213c4 100644 (file)
@@ -3,12 +3,24 @@
 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"
+ *   id = "empty",
+ *   source_module = "migrate"
  * )
  */
 class EmptySource extends SourcePluginBase {
@@ -47,7 +59,7 @@ class EmptySource extends SourcePluginBase {
   /**
    * {@inheritdoc}
    */
-  public function count() {
+  public function count($refresh = FALSE) {
     return 1;
   }