function sitemap_form_menu_add_form_builder in Sitemap 8
Entity builder for the menu configuration entity.
1 string reference to 'sitemap_form_menu_add_form_builder'
- sitemap_alter_menu_forms in ./
sitemap.module - Handles the form alter for the menu_add_form and menu_edit_form forms to add a settings field to the menu entity.
File
- ./
sitemap.module, line 266 - Provides sitemap functionality.
Code
function sitemap_form_menu_add_form_builder($entity_type, Menu $menu, &$form, FormStateInterface $form_state) {
if ($form_state
->getValue('sitemap_display_name')) {
$menu
->setThirdPartySetting('sitemap', 'sitemap_display_name', $form_state
->getValue('sitemap_display_name'));
return;
}
}