function EntityDisplayModeFormBase::getFormDisplay
Same name in other branches
- 10 core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php \Drupal\field_ui\Form\EntityDisplayModeFormBase::getFormDisplay()
Load the form display for a given bundle and form mode name.
Parameters
string $bundle: The entity bundle to load the form display for.
string $form_mode_name: The form mode name to load the form display for.
Return value
\Drupal\Core\Entity\Display\EntityFormDisplayInterface|null Returns the form display, or NULL if one does not exist.
File
-
core/
modules/ field_ui/ src/ Form/ EntityDisplayModeFormBase.php, line 278
Class
- EntityDisplayModeFormBase
- Provides the generic base class for entity display mode forms.
Namespace
Drupal\field_ui\FormCode
private function getFormDisplay(string $bundle, string $form_mode_name) : ?EntityFormDisplayInterface {
$form_mode_id = $this->targetEntityTypeId . '.' . $bundle . '.' . $form_mode_name;
return $this->entityTypeManager
->getStorage('entity_form_display')
->load($form_mode_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.