X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FPlugin%2Fmigrate%2Fdestination%2FEntityFieldInstance.php;fp=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FPlugin%2Fmigrate%2Fdestination%2FEntityFieldInstance.php;h=090ec3a93a7cb766cda12c7a0cf8e23639d3a1da;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=a431c4972bb4b44118519d60397b485c9f6ad654;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldInstance.php b/web/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldInstance.php index a431c4972..090ec3a93 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldInstance.php +++ b/web/core/modules/migrate/src/Plugin/migrate/destination/EntityFieldInstance.php @@ -3,7 +3,43 @@ namespace Drupal\migrate\Plugin\migrate\destination; /** - * Provides entity field instance plugin. + * Provides destination plugin for field_config configuration entities. + * + * The Field API defines two primary data structures, FieldStorage and Field. + * A FieldStorage defines a particular type of data that can be attached to + * entities as a Field instance. + * + * The example below adds an instance of 'field_text_example' to 'article' + * bundle (node content type). The example uses the EmptySource source plugin + * and constant source values for the sake of simplicity. For an example on how + * the FieldStorage 'field_text_example' can be migrated, refer to + * \Drupal\migrate\Plugin\migrate\destination\EntityFieldStorageConfig. + * @code + * id: field_instance_example + * label: Field instance example + * source: + * plugin: empty + * constants: + * entity_type: node + * field_name: field_text_example + * bundle: article + * label: Text field example + * translatable: true + * process: + * entity_type: constants/entity_type + * field_name: constants/field_name + * bundle: constants/bundle + * label: constants/label + * translatable: constants/translatable + * destination: + * plugin: entity:field_config + * migration_dependencies: + * required: + * - field_storage_example + * @endcode + * + * @see \Drupal\field\Entity\FieldConfig + * @see \Drupal\field\Entity\FieldConfigBase * * @MigrateDestination( * id = "entity:field_config"