summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Hojtsy2017-11-09 23:27:50 +0100
committerGabor Hojtsy2017-11-09 23:27:50 +0100
commit0f64348e6d9437499fb61a40c649be9fba47e809 (patch)
tree563dbbe6060c6364f976a82bb5e4d9eb733d4a1e
parent2a9dc18b4b134fbeb8433a4a4165e3d1f2be3992 (diff)
Issue #2862673 by masipila, Pavan B S, Jo Fitzgerald, phenaproxima: Add documentation to EmptySource source plugin
-rw-r--r--core/modules/migrate/src/Plugin/migrate/source/EmptySource.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php b/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php
index 2391b0a..5f44035 100644
--- a/core/modules/migrate/src/Plugin/migrate/source/EmptySource.php
+++ b/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"