summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Hojtsy2017-11-09 22:43:38 +0100
committerGabor Hojtsy2017-11-09 22:43:38 +0100
commit2a9dc18b4b134fbeb8433a4a4165e3d1f2be3992 (patch)
treee0592c02bdc2df206c73dc729f22dd6df44a538f
parent6dc062eb45f223359252703347d9c9d316119344 (diff)
Issue #2728869 by masipila, gaurav.kapoor, pk188, quietone, heddn, phenaproxima, generalredneck, mikeryan, eojthebrave: Document public function MigrateSourceInterface::getIds return value better
-rw-r--r--core/modules/migrate/src/Plugin/MigrateSourceInterface.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/core/modules/migrate/src/Plugin/MigrateSourceInterface.php b/core/modules/migrate/src/Plugin/MigrateSourceInterface.php
index a40af2e..480e5ed 100644
--- a/core/modules/migrate/src/Plugin/MigrateSourceInterface.php
+++ b/core/modules/migrate/src/Plugin/MigrateSourceInterface.php
@@ -53,9 +53,12 @@ interface MigrateSourceInterface extends \Countable, \Iterator, PluginInspection
* An associative array of field definitions keyed by field ID. Values are
* associative arrays with a structure that contains the field type ('type'
* key). The other keys are the field storage settings as they are returned
- * by FieldStorageDefinitionInterface::getSettings(). As an example, for a
- * composite source primary key that is defined by an integer and a
- * string, the returned value might look like:
+ * by FieldStorageDefinitionInterface::getSettings().
+ *
+ * Examples:
+ *
+ * A composite source primary key that is defined by an integer and a string
+ * might look like this:
* @code
* return [
* 'id' => [
@@ -70,6 +73,7 @@ interface MigrateSourceInterface extends \Countable, \Iterator, PluginInspection
* ],
* ];
* @endcode
+ *
* If 'type' points to a field plugin with multiple columns and needs to
* refer to a column different than 'value', the key of that column will be
* appended as a suffix to the plugin name, separated by dot ('.'). Example:
@@ -80,9 +84,13 @@ interface MigrateSourceInterface extends \Countable, \Iterator, PluginInspection
* ],
* ];
* @endcode
- * Additional custom keys/values, that are not part of field storage
- * definition, can be passed in definitions. The most common setting, passed
- * along the ID definition, is 'alias' used by SqlBase source plugin:
+ *
+ * Additional custom keys/values that are not part of field storage
+ * definition can be added as shown below. The most common setting
+ * passed along to the ID definition is 'alias', used by the SqlBase source
+ * plugin in order to distinguish between ambiguous column names - for
+ * example, when a SQL source query joins two tables with the same column
+ * names.
* @code
* return [
* 'nid' => [