You are here

public static function GroupMenuBlock::processMenuLevelParents in Group Content Menu 8

Form API callback: Processes the menu_levels field element.

Adjusts the #parents of menu_levels to save its children at the top level.

File

src/Plugin/Block/GroupMenuBlock.php, line 149

Class

GroupMenuBlock
Provides a generic Menu block.

Namespace

Drupal\group_content_menu\Plugin\Block

Code

public static function processMenuLevelParents(&$element, FormStateInterface $form_state, &$complete_form) {
  array_pop($element['#parents']);
  return $element;
}