MenuForm::save

public MenuForm::save(array $form, FormStateInterface $form_state) Form submission handler for the 'save' action. Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved. Parameters array $form: An associative array containing the structure of the form. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value int Either SAVED_NEW or SAVED_UPDATED, depending on the operation pe

MenuForm::menuNameExists

public MenuForm::menuNameExists($value) Returns whether a menu name already exists. Parameters string $value: The name of the menu. Return value bool Returns TRUE if the menu already exists, FALSE otherwise. File core/modules/menu_ui/src/MenuForm.php, line 161 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui Code public function menuNameExists($value) { // Check first to see if a menu with this ID exists. if ($this->entityQueryFactory->get('menu')->

MenuForm::form

public MenuForm::form(array $form, FormStateInterface $form_state) Gets the actual form array to be built. Overrides EntityForm::form See also \Drupal\Core\Entity\EntityForm::processForm() \Drupal\Core\Entity\EntityForm::afterBuild() File core/modules/menu_ui/src/MenuForm.php, line 95 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui Code public function form(array $form, FormStateInterface $form_state) { $menu = $this->entity; if ($this->operation == '

MenuForm::create

public static MenuForm::create(ContainerInterface $container) Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. Parameters \Symfony\Component\DependencyInjection\ContainerInterface $container: The service contain

MenuForm::buildOverviewTreeForm

protected MenuForm::buildOverviewTreeForm($tree, $delta) Recursive helper function for buildOverviewForm(). Parameters \Drupal\Core\Menu\MenuLinkTreeElement[] $tree: The tree retrieved by \Drupal\Core\Menu\MenuLinkTreeInterface::load(). int $delta: The default number of menu items used in the menu weight selector is 50. Return value array The overview tree form. File core/modules/menu_ui/src/MenuForm.php, line 338 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui

MenuForm::buildOverviewForm

protected MenuForm::buildOverviewForm(array &$form, FormStateInterface $form_state) Form constructor to edit an entire menu tree at once. Shows for one menu the menu links accessible to the current user and relevant operations. This form constructor can be integrated as a section into another form. It relies on the following keys in $form_state: menu: A menu entity. menu_overview_form_parents: An array containing the parent keys to this form. Forms integrating this section should call m

MenuForm::$overviewTreeForm

The overview tree form. Type: array File core/modules/menu_ui/src/MenuForm.php, line 59 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui Code protected $overviewTreeForm = array('#tree' => TRUE);

MenuForm::$menuTree

The menu tree service. Type: \Drupal\Core\Menu\MenuLinkTreeInterface File core/modules/menu_ui/src/MenuForm.php, line 45 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui Code protected $menuTree;

MenuForm::$menuLinkManager

The menu link manager. Type: \Drupal\Core\Menu\MenuLinkManagerInterface File core/modules/menu_ui/src/MenuForm.php, line 38 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui Code protected $menuLinkManager;

MenuForm::$linkGenerator

The link generator. Type: \Drupal\Core\Utility\LinkGeneratorInterface Overrides LinkGeneratorTrait::$linkGenerator File core/modules/menu_ui/src/MenuForm.php, line 52 Class MenuForm Base form for menu edit forms. Namespace Drupal\menu_ui Code protected $linkGenerator;