interface FormModeManagerInterface in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/FormModeManagerInterface.php \Drupal\form_mode_manager\FormModeManagerInterface
Interface FormModeManagerInterface.
Hierarchy
- interface \Drupal\form_mode_manager\FormModeManagerInterface
Expanded class hierarchy of FormModeManagerInterface
All classes that implement FormModeManagerInterface
8 files declare their use of FormModeManagerInterface
- DefaultRouteSubscriber.php in src/
Routing/ EventSubscriber/ DefaultRouteSubscriber.php - EntityFormModeBase.php in src/
Controller/ EntityFormModeBase.php - FormModeManagerConverter.php in src/
ParamConverter/ FormModeManagerConverter.php - FormModeManagerForm.php in src/
Form/ FormModeManagerForm.php - FormModeManagerLinksForm.php in src/
Form/ FormModeManagerLinksForm.php
File
- src/
FormModeManagerInterface.php, line 10
Namespace
Drupal\form_mode_managerView source
interface FormModeManagerInterface {
/**
* Returns entity (form) displays for the current entity display type.
*
* @param string $entity_type_id
* The entity type ID to check active modes.
*
* @return array
* The Display mode id for defined entity_type_id.
*/
public function getActiveDisplays($entity_type_id);
/**
* Gets the path of specified entity type for a form mode.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
* @param string $form_mode_id
* The form mode machine name.
*
* @return string
* The path to use the specified form mode.
*/
public function getFormModeManagerPath(EntityTypeInterface $entity_type, $form_mode_id);
/**
* Gets all form modes id for a specific entity type.
*
* @param string $entity_type_id
* The entity type id.
*
* @return array
* An array contain all available form mode machine name.
*/
public function getFormModesIdByEntity($entity_type_id);
/**
* Gets the entity form mode info for a specific entity type.
*
* @param string $entity_type_id
* The entity type.
*
* @return array
* An array contain all available form mode machine name.
*/
public function getFormModesByEntity($entity_type_id);
/**
* Gets the entity form mode info for all entity types used.
*
* @param bool $ignore_excluded
* Joker to determine if form modes to exclude list are used or ignored.
*
* @return array
* The collection without uneeded form modes.
*/
public function getAllFormModesDefinitions($ignore_excluded = FALSE);
/**
* Filter a form mode collection to exclude all desired form mode id.
*
* @param array $form_mode
* A form mode collection to be filtered.
* @param string $entity_type_id
* The entity type ID of entity.
* @param bool $ignore_excluded
* Joker to determine if form modes to exclude list are used or ignored.
*
* @return array
* The collection without uneeded form modes.
*/
public function filterExcludedFormModes(array &$form_mode, $entity_type_id, $ignore_excluded);
/**
* Retrieve the list of form_modes unavailable to expose by Form Mode Manager.
*
* @param string $entity_type_id
* The entity type ID of entity.
*
* @return array[]
* The list of form modes to exclude.
*/
public function getFormModeExcluded($entity_type_id);
/**
* Determine if form_mode definition passed is valid.
*
* @param array $form_mode
* A form mode definition to fetch.
*
* @return bool
* True if Form mode have a minimum informations or false.
*/
public function isValidFormMode(array $form_mode);
/**
* Evaluate if current form_mode is candidate to be filtered or not.
*
* @param array $form_mode
* A form mode definition.
* @param string $entity_type_id
* The entity type id.
*
* @return bool
* True if form mode is candidate to be excluded or False if not.
*/
public function candidateToExclude(array $form_mode, $entity_type_id);
/**
* Gets the entity form mode info for a specific bundle.
*
* @param string $entity_type_id
* The entity type id.
* @param string $bundle_id
* Identifier of bundle.
*
* @return array|null
* The form mode activated for defined bundle.
*/
public function getActiveDisplaysByBundle($entity_type_id, $bundle_id);
/**
* Determine if a form mode is activated onto bundle of specific entity.
*
* @param string $entity_type_id
* The entity type id.
* @param string $bundle_id
* Name of bundle for current entity.
* @param string $form_mode_machine_name
* Machine name of form mode.
*
* @return bool
* True if FormMode is activated on needed bundle.
*/
public function isActive($entity_type_id, $bundle_id, $form_mode_machine_name);
/**
* Retrieve Form Mode Machine Name from the form mode id.
*
* @param string $form_mode_id
* Identifier of form mode prefixed by entity type id.
*
* @return string
* The form mode machine name without prefixe of,
* entity (entity.form_mode_name).
*/
public function getFormModeMachineName($form_mode_id);
/**
* The list cache tags associated with form display entities.
*
* Enables code listing entities of this type to ensure that newly created
* entities show up immediately. This is wrapped by Form Mode Manager to,
* permit a more precise cache strategy and allow Form Mode Manager to,
* add her permissions tags.
*
* @return string[]
* List of cache Tags to invalidate.
*/
public function getListCacheTags();
/**
* Determine Local tasks position for an entity.
*
* @param string $entity_type_id
* The entity type id.
*
* @return bool
* True if tasks does display at primary position.
*/
public function tasksIsPrimary($entity_type_id);
/**
* Determine if current entity_type has one bundle implement this mode.
*
* @param string $entity_type
* The entity type id.
* @param string $form_mode_id
* Identifier of form mode prefixed by entity type id.
*
* @return bool
* True if tasks does display at primary position.
*/
public function hasActiveFormMode($entity_type, $form_mode_id);
/**
* Set all entity handlers needed by form mode manager on entity type basis.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_definition
* The entity type to alter.
*/
public function setEntityHandlersPerFormModes(EntityTypeInterface $entity_definition);
/**
* Set new FormClass handler per form modes keyed by form mode name.
*
* This setter are the best way to alter the basic FormClass,
* for specific operation (form mode) @see http://bit.ly/2sL5L7W .
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_definition
* The entity type to alter.
* @param string $form_mode_name
* The form mode human name used by current entity definition.
*/
public function setFormClassPerFormModes(EntityTypeInterface $entity_definition, $form_mode_name);
/**
* Set new LinkTemplate handler on entity definition basis.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_definition
* The entity type to alter.
* @param string $form_mode_name
* The form mode human name used by current entity definition.
*/
public function setLinkTemplatePerFormModes(EntityTypeInterface $entity_definition, $form_mode_name);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FormModeManagerInterface:: |
public | function | Evaluate if current form_mode is candidate to be filtered or not. | 1 |
FormModeManagerInterface:: |
public | function | Filter a form mode collection to exclude all desired form mode id. | 1 |
FormModeManagerInterface:: |
public | function | Returns entity (form) displays for the current entity display type. | 1 |
FormModeManagerInterface:: |
public | function | Gets the entity form mode info for a specific bundle. | 1 |
FormModeManagerInterface:: |
public | function | Gets the entity form mode info for all entity types used. | 1 |
FormModeManagerInterface:: |
public | function | Retrieve the list of form_modes unavailable to expose by Form Mode Manager. | 1 |
FormModeManagerInterface:: |
public | function | Retrieve Form Mode Machine Name from the form mode id. | 1 |
FormModeManagerInterface:: |
public | function | Gets the path of specified entity type for a form mode. | 1 |
FormModeManagerInterface:: |
public | function | Gets the entity form mode info for a specific entity type. | 1 |
FormModeManagerInterface:: |
public | function | Gets all form modes id for a specific entity type. | 1 |
FormModeManagerInterface:: |
public | function | The list cache tags associated with form display entities. | 1 |
FormModeManagerInterface:: |
public | function | Determine if current entity_type has one bundle implement this mode. | 1 |
FormModeManagerInterface:: |
public | function | Determine if a form mode is activated onto bundle of specific entity. | 1 |
FormModeManagerInterface:: |
public | function | Determine if form_mode definition passed is valid. | 1 |
FormModeManagerInterface:: |
public | function | Set all entity handlers needed by form mode manager on entity type basis. | 1 |
FormModeManagerInterface:: |
public | function | Set new FormClass handler per form modes keyed by form mode name. | 1 |
FormModeManagerInterface:: |
public | function | Set new LinkTemplate handler on entity definition basis. | 1 |
FormModeManagerInterface:: |
public | function | Determine Local tasks position for an entity. | 1 |