You are here

protected function SystemMenuOffCanvasForm::getEntityForm in Drupal 8

Same name and namespace in other branches
  1. 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.

File

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

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;
}