Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / migrate / src / Plugin / migrate / destination / EntityBaseFieldOverride.php
index 75232490b7b325932cd7ae7d7302bca592ab5cf7..e6b3682eb0bb1e8e3575e956f0b3f8d2eb130884 100644 (file)
@@ -5,7 +5,42 @@ namespace Drupal\migrate\Plugin\migrate\destination;
 use Drupal\migrate\Row;
 
 /**
- * Provides entity base field override plugin.
+ * Provides entity base field override destination plugin.
+ *
+ * Base fields are non-configurable fields that always exist on a given entity
+ * type, like the 'title', 'created' and 'sticky' fields of the 'node' entity
+ * type. Some entity types can have bundles, for example the node content types.
+ * The base fields exist on all bundles but the bundles can override the
+ * definitions. For example, the label for node 'title' base field can be
+ * different on different content types.
+ *
+ * Example:
+ *
+ * The example below migrates the node 'sticky' settings for each content type.
+ * @code
+ * id: d6_node_setting_sticky
+ * label: Node type 'sticky' setting
+ * migration_tags:
+ *   - Drupal 6
+ * source:
+ *   plugin: d6_node_type
+ *   constants:
+ *     entity_type: node
+ *     field_name: sticky
+ * process:
+ *   entity_type: 'constants/entity_type'
+ *   bundle: type
+ *   field_name: 'constants/field_name'
+ *   label:
+ *     plugin: default_value
+ *     default_value: 'Sticky at the top of lists'
+ *   'default_value/0/value': 'options/sticky'
+ * destination:
+ *   plugin: entity:base_field_override
+ * migration_dependencies:
+ *   required:
+ *     - d6_node_type
+ * @endcode
  *
  * @MigrateDestination(
  *   id = "entity:base_field_override"