X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FPlugin%2FMigrateSourceInterface.php;h=6b4068453611cac834003d461aa865f53e80b676;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hp=ef1785e6fb000603d2f7cce2bed130802c4d6bf9;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/migrate/src/Plugin/MigrateSourceInterface.php b/web/core/modules/migrate/src/Plugin/MigrateSourceInterface.php index ef1785e6f..6b4068453 100644 --- a/web/core/modules/migrate/src/Plugin/MigrateSourceInterface.php +++ b/web/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 table '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' => [ @@ -100,4 +108,12 @@ interface MigrateSourceInterface extends \Countable, \Iterator, PluginInspection */ public function getIds(); + /** + * Gets the source module providing the source data. + * + * @return string|null + * The source module or NULL if not found. + */ + public function getSourceModule(); + }