comparison core/modules/migrate/src/Plugin/MigrateSourceInterface.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
51 * 51 *
52 * @return array[] 52 * @return array[]
53 * An associative array of field definitions keyed by field ID. Values are 53 * An associative array of field definitions keyed by field ID. Values are
54 * associative arrays with a structure that contains the field type ('type' 54 * associative arrays with a structure that contains the field type ('type'
55 * key). The other keys are the field storage settings as they are returned 55 * key). The other keys are the field storage settings as they are returned
56 * by FieldStorageDefinitionInterface::getSettings(). As an example, for a 56 * by FieldStorageDefinitionInterface::getSettings().
57 * composite source primary key that is defined by an integer and a 57 *
58 * string, the returned value might look like: 58 * Examples:
59 *
60 * A composite source primary key that is defined by an integer and a string
61 * might look like this:
59 * @code 62 * @code
60 * return [ 63 * return [
61 * 'id' => [ 64 * 'id' => [
62 * 'type' => 'integer', 65 * 'type' => 'integer',
63 * 'unsigned' => FALSE, 66 * 'unsigned' => FALSE,
68 * 'max_length' => 64, 71 * 'max_length' => 64,
69 * 'is_ascii' => TRUE, 72 * 'is_ascii' => TRUE,
70 * ], 73 * ],
71 * ]; 74 * ];
72 * @endcode 75 * @endcode
76 *
73 * If 'type' points to a field plugin with multiple columns and needs to 77 * If 'type' points to a field plugin with multiple columns and needs to
74 * refer to a column different than 'value', the key of that column will be 78 * refer to a column different than 'value', the key of that column will be
75 * appended as a suffix to the plugin name, separated by dot ('.'). Example: 79 * appended as a suffix to the plugin name, separated by dot ('.'). Example:
76 * @code 80 * @code
77 * return [ 81 * return [
78 * 'format' => [ 82 * 'format' => [
79 * 'type' => 'text.format', 83 * 'type' => 'text.format',
80 * ], 84 * ],
81 * ]; 85 * ];
82 * @endcode 86 * @endcode
83 * Additional custom keys/values, that are not part of field storage 87 *
84 * definition, can be passed in definitions. The most common setting, passed 88 * Additional custom keys/values that are not part of field storage
85 * along the ID definition, is 'alias' used by SqlBase source plugin: 89 * definition can be added as shown below. The most common setting
90 * passed along to the ID definition is 'alias', used by the SqlBase source
91 * plugin in order to distinguish between ambiguous column names - for
92 * example, when a SQL source query joins two tables with the same column
93 * names.
86 * @code 94 * @code
87 * return [ 95 * return [
88 * 'nid' => [ 96 * 'nid' => [
89 * 'type' => 'integer', 97 * 'type' => 'integer',
90 * 'alias' => 'n', 98 * 'alias' => 'n',