public function FormModeManager::getFormModesByEntity in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/FormModeManager.php \Drupal\form_mode_manager\FormModeManager::getFormModesByEntity()
Gets the entity form mode info for a specific entity type.
Parameters
string $entity_type_id: The entity type.
Return value
array An array contain all available form mode machine name.
Overrides FormModeManagerInterface::getFormModesByEntity
2 calls to FormModeManager::getFormModesByEntity()
- FormModeManager::getActiveDisplaysByBundle in src/
FormModeManager.php - Gets the entity form mode info for a specific bundle.
- FormModeManager::getFormModesIdByEntity in src/
FormModeManager.php - Gets all form modes id for a specific entity type.
File
- src/
FormModeManager.php, line 127
Class
- FormModeManager
- FormDisplayManager service.
Namespace
Drupal\form_mode_managerCode
public function getFormModesByEntity($entity_type_id) {
$form_modes = $this->entityDisplayRepository
->getFormModes($entity_type_id);
$this
->filterExcludedFormModes($form_modes, $entity_type_id, FALSE);
return $form_modes;
}