You are here

public static function MenuBlock::processMenuBlockFieldSets in Menu Block 8

Form API callback: Processes the elements in field sets.

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

File

src/Plugin/Block/MenuBlock.php, line 194

Class

MenuBlock
Provides an extended Menu block.

Namespace

Drupal\menu_block\Plugin\Block

Code

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