public function FieldGroup::getIds in Field Group 8.3
Same name in this branch
- 8.3 contrib/field_group_migrate/src/Plugin/migrate/source/d6/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\source\d6\FieldGroup::getIds()
- 8.3 contrib/field_group_migrate/src/Plugin/migrate/source/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\source\d7\FieldGroup::getIds()
- 8.3 contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\destination\d7\FieldGroup::getIds()
Same name and namespace in other branches
- 8 contrib/field_group_migrate/src/Plugin/migrate/destination/d7/FieldGroup.php \Drupal\field_group_migrate\Plugin\migrate\destination\d7\FieldGroup::getIds()
Gets the destination IDs.
To support MigrateIdMap maps, derived destination classes should return field definition(s) corresponding to the primary key of the destination being implemented. These are used to construct the destination key fields of the map table for a migration using this destination.
Return value
array[] 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 destination primary key that is defined by an integer and a string, the returned value might look like:
return [
'id' => [
'type' => 'integer',
'unsigned' => FALSE,
'size' => 'big',
],
'version' => [
'type' => 'string',
'max_length' => 64,
'is_ascii' => TRUE,
],
];
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:
return [
'format' => [
'type' => 'text.format',
],
];
Additional custom keys/values, that are not part of field storage definition, can be passed in definitions:
return [
'nid' => [
'type' => 'integer',
'custom_setting' => 'some_value',
],
];
Overrides MigrateDestinationInterface::getIds
See also
\Drupal\Core\Field\FieldStorageDefinitionInterface::getSettings()
\Drupal\Core\Field\Plugin\Field\FieldType\IntegerItem
\Drupal\Core\Field\Plugin\Field\FieldType\StringItem
\Drupal\text\Plugin\Field\FieldType\TextItem
1 call to FieldGroup::getIds()
- FieldGroup::import in contrib/
field_group_migrate/ src/ Plugin/ migrate/ destination/ d7/ FieldGroup.php - Import the row.
File
- contrib/
field_group_migrate/ src/ Plugin/ migrate/ destination/ d7/ FieldGroup.php, line 46
Class
- FieldGroup
- This class imports one field_group of an entity form display.
Namespace
Drupal\field_group_migrate\Plugin\migrate\destination\d7Code
public function getIds() {
$ids['entity_type']['type'] = 'string';
$ids['bundle']['type'] = 'string';
$ids['mode']['type'] = 'string';
$ids['type']['type'] = 'string';
$ids['group_name']['type'] = 'string';
return $ids;
}