function menu_ui_form_node_type_form_builder
Same name in other branches
- 8.9.x core/modules/menu_ui/menu_ui.module \menu_ui_form_node_type_form_builder()
- 10 core/modules/menu_ui/menu_ui.module \menu_ui_form_node_type_form_builder()
- 11.x core/modules/menu_ui/menu_ui.module \menu_ui_form_node_type_form_builder()
Entity builder for the node type form with menu options.
See also
menu_ui_form_node_type_form_alter()
1 string reference to 'menu_ui_form_node_type_form_builder'
- menu_ui_form_node_type_form_alter in core/
modules/ menu_ui/ menu_ui.module - Implements hook_form_FORM_ID_alter() for \Drupal\node\NodeTypeForm.
File
-
core/
modules/ menu_ui/ menu_ui.module, line 421
Code
function menu_ui_form_node_type_form_builder($entity_type, NodeTypeInterface $type, &$form, FormStateInterface $form_state) {
$type->setThirdPartySetting('menu_ui', 'available_menus', array_values(array_filter($form_state->getValue('menu_options'))));
$type->setThirdPartySetting('menu_ui', 'parent', $form_state->getValue('menu_parent'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.