3 namespace Drupal\migrate\Plugin\migrate\destination;
6 * This class imports one component of an entity form display.
8 * Destination properties expected in the imported row:
9 * - entity_type: The entity type ID.
10 * - bundle: The entity bundle.
11 * - form_mode: The machine name of the form mode.
12 * - field_name: The machine name of the field to be imported into the display.
13 * - options: (optional) An array of options for displaying the field in this
25 * type: comment_default
28 * entity_type: 'constants/entity_type'
29 * field_name: 'constants/field_name'
30 * form_mode: 'constants/form_mode'
31 * options: 'constants/options'
34 * plugin: component_entity_form_display
37 * This will add a "comment" field on the "default" form mode of the "node"
38 * entity type with options defined by the "options" constant.
40 * @MigrateDestination(
41 * id = "component_entity_form_display"
44 class PerComponentEntityFormDisplay extends ComponentEntityDisplayBase {
46 const MODE_NAME = 'form_mode';
51 protected function getEntity($entity_type, $bundle, $form_mode) {
52 return entity_get_form_display($entity_type, $bundle, $form_mode);