You are here

protected function SystemMenuOffCanvasForm::getEntityForm in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/src/Form/SystemMenuOffCanvasForm.php \Drupal\system\Form\SystemMenuOffCanvasForm::getEntityForm()
  2. 9 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.

3 calls to SystemMenuOffCanvasForm::getEntityForm()
SystemMenuOffCanvasForm::buildConfigurationForm in core/modules/system/src/Form/SystemMenuOffCanvasForm.php
Form constructor.
SystemMenuOffCanvasForm::submitConfigurationForm in core/modules/system/src/Form/SystemMenuOffCanvasForm.php
Form submission handler.
SystemMenuOffCanvasForm::validateConfigurationForm in core/modules/system/src/Form/SystemMenuOffCanvasForm.php
Form validation handler.

File

core/modules/system/src/Form/SystemMenuOffCanvasForm.php, line 157

Class

SystemMenuOffCanvasForm
The setting_tray form handler for the SystemMenuBlock.

Namespace

Drupal\system\Form

Code

protected function getEntityForm(MenuInterface $menu) {
  $entity_form = $this->entityTypeManager
    ->getFormObject('menu', 'edit');
  $entity_form
    ->setEntity($menu);
  return $entity_form;
}