1<?php 2 3namespace Drupal\Core\Entity\Entity; 4 5use Drupal\Core\Entity\EntityDisplayModeBase; 6use Drupal\Core\Entity\EntityFormModeInterface; 7 8/** 9 * Defines the entity form mode configuration entity class. 10 * 11 * Form modes allow entity forms to be displayed differently depending on the 12 * context. For instance, the user entity form can be displayed with a set of 13 * fields on the 'profile' page (user edit page) and with a different set of 14 * fields (or settings) on the user registration page. Modules taking part in 15 * the display of the entity form (notably the Field API) can adjust their 16 * behavior depending on the requested form mode. An additional 'default' form 17 * mode is available for all entity types. For each available form mode, 18 * administrators can configure whether it should use its own set of field 19 * display settings, or just replicate the settings of the 'default' form mode, 20 * thus reducing the amount of form display configurations to keep track of. 21 * 22 * @see \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getAllFormModes() 23 * @see \Drupal\Core\Entity\EntityDisplayRepositoryInterface::getFormModes() 24 * 25 * @ConfigEntityType( 26 * id = "entity_form_mode", 27 * label = @Translation("Form mode"), 28 * entity_keys = { 29 * "id" = "id", 30 * "label" = "label" 31 * }, 32 * config_export = { 33 * "id", 34 * "label", 35 * "targetEntityType", 36 * "cache", 37 * } 38 * ) 39 */ 40class EntityFormMode extends EntityDisplayModeBase implements EntityFormModeInterface { 41 42} 43