protected function SystemMenuOffCanvasForm::getEntityForm in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/src/Form/SystemMenuOffCanvasForm.php \Drupal\system\Form\SystemMenuOffCanvasForm::getEntityForm()
Gets the entity form for this menu.
Parameters
\Drupal\system\MenuInterface $menu: The menu entity.
Return value
\Drupal\Core\Entity\EntityFormInterface The entity form.
File
- core/
modules/ system/ src/ Form/ SystemMenuOffCanvasForm.php, line 154
Class
- SystemMenuOffCanvasForm
- The setting_tray form handler for the SystemMenuBlock.
Namespace
Drupal\system\FormCode
protected function getEntityForm(MenuInterface $menu) {
$entity_form = $this->entityTypeManager
->getFormObject('menu', 'edit');
$entity_form
->setEntity($menu);
return $entity_form;
}