You are here

function menu_attributes_form_node_form_alter in Menu Attributes 8

Same name and namespace in other branches
  1. 7 menu_attributes.module \menu_attributes_form_node_form_alter()

Implements hook_form_FORM_ID_alter().

Adds menu attribute options to the node's edit menu item form.

See also

_menu_attributes_form_alter()

File

./menu_attributes.module, line 170
Alters the menu item form to allow the administrator to specify additional attributes for the menu link

Code

function menu_attributes_form_node_form_alter(&$form, FormStateInterface $form_state) {
  if (isset($form['menu']['link']) && isset($form['#node']->menu)) {
    $item = $form['#node']->menu;

    // @todo Need to pass in the form state and menu link.
    // _menu_attributes_form_alter($form['menu']['link'], $form['menu']['link'], $form);
  }
}