public function FormModeManager::setEntityHandlersPerFormModes in Form mode manager 8.2
Same name and namespace in other branches
- 8 src/FormModeManager.php \Drupal\form_mode_manager\FormModeManager::setEntityHandlersPerFormModes()
Set all entity handlers needed by form mode manager on entity type basis.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_definition: The entity type to alter.
Overrides FormModeManagerInterface::setEntityHandlersPerFormModes
File
- src/
FormModeManager.php, line 318
Class
- FormModeManager
- FormDisplayManager service.
Namespace
Drupal\form_mode_managerCode
public function setEntityHandlersPerFormModes(EntityTypeInterface $entity_definition) {
$form_modes = array_keys($this->entityDisplayRepository
->getFormModes($entity_definition
->id()));
if (empty($form_modes)) {
return;
}
foreach ($form_modes as $form_mode_name) {
$this
->setFormClassPerFormModes($entity_definition, $form_mode_name);
$this
->setLinkTemplatePerFormModes($entity_definition, $form_mode_name);
}
}