function MenuUiHooks::nodeBuilder

Same name and namespace in other branches
  1. 11.x core/modules/menu_ui/src/Hook/MenuUiHooks.php \Drupal\menu_ui\Hook\MenuUiHooks::nodeBuilder()

Entity form builder to add the menu information to the node.

File

core/modules/menu_ui/src/Hook/MenuUiHooks.php, line 238

Class

MenuUiHooks
Hook implementations for menu_ui.

Namespace

Drupal\menu_ui\Hook

Code

public function nodeBuilder(string $entity_type, NodeInterface $entity, array &$form, FormStateInterface $form_state) : void {
  $entity->menu = $form_state->getValue('menu');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.