3 namespace Drupal\migrate\Plugin\migrate\destination;
6 * Provides destination plugin for field_storage_config configuration entities.
8 * The Field API defines two primary data structures, FieldStorage and Field.
9 * A FieldStorage defines a particular type of data that can be attached to
10 * entities as a Field instance.
12 * The example below creates a storage for a simple text field. The example uses
13 * the EmptySource source plugin and constant source values for the sake of
16 * id: field_storage_example
17 * label: Field storage example
22 * id: node.field_text_example
23 * field_name: field_text_example
31 * entity_type: constants/entity_type
33 * field_name: constants/field_name
34 * type: constants/type
35 * cardinality: constants/cardinality
36 * settings: constants/settings
37 * langcode: constants/langcode
38 * translatable: constants/translatable
40 * plugin: entity:field_storage_config
43 * For a full list of the properties of a FieldStorage configuration entity,
44 * refer to \Drupal\field\Entity\FieldStorageConfig.
46 * For an example on how to migrate a Field instance of this FieldStorage,
47 * refer to \Drupal\migrate\Plugin\migrate\destination\EntityFieldInstance.
49 * @MigrateDestination(
50 * id = "entity:field_storage_config"
53 class EntityFieldStorageConfig extends EntityConfigBase {
58 public function getIds() {
59 $ids['entity_type']['type'] = 'string';
60 $ids['field_name']['type'] = 'string';
67 public function rollback(array $destination_identifier) {
68 $destination_identifier = implode('.', $destination_identifier);
69 parent::rollback([$destination_identifier]);