public function FormModeManager::getAllFormModesDefinitions in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/FormModeManager.php \Drupal\form_mode_manager\FormModeManager::getAllFormModesDefinitions()
Gets the entity form mode info for all entity types used.
Parameters
bool $ignore_excluded: Joker to determine if form modes to exclude list are used or ignored.
Return value
array The collection without uneeded form modes.
Overrides FormModeManagerInterface::getAllFormModesDefinitions
File
- src/
FormModeManager.php, line 136
Class
- FormModeManager
- FormDisplayManager service.
Namespace
Drupal\form_mode_managerCode
public function getAllFormModesDefinitions($ignore_excluded = FALSE) {
$filtered_form_modes = [];
$form_modes = $this->entityDisplayRepository
->getAllFormModes();
foreach ($form_modes as $entity_type_id => $form_mode) {
$this
->filterExcludedFormModes($form_mode, $entity_type_id, $ignore_excluded);
if (!empty($form_mode)) {
$filtered_form_modes[$entity_type_id] = $form_mode;
}
}
return $filtered_form_modes;
}