You are here

public function TBMegaMenuAdminController::getMenuName in The Better Mega Menu 8

Same name and namespace in other branches
  1. 2.x src/Controller/TBMegaMenuAdminController.php \Drupal\tb_megamenu\Controller\TBMegaMenuAdminController::getMenuName()

Get the machine name of a menu.

Parameters

array $data: A decoded JSON object used to load the configuration.

Return value

mixed A string or null.

2 calls to TBMegaMenuAdminController::getMenuName()
TBMegaMenuAdminController::loadMenuConfig in src/Controller/TBMegaMenuAdminController.php
Loads a menu configuration.
TBMegaMenuAdminController::saveMenuConfig in src/Controller/TBMegaMenuAdminController.php
Saves a menu configuration.

File

src/Controller/TBMegaMenuAdminController.php, line 303

Class

TBMegaMenuAdminController
Handler for configuring and saving MegaMenu settings.

Namespace

Drupal\tb_megamenu\Controller

Code

public function getMenuName(array $data) {
  return isset($data['menu_name']) ? $data['menu_name'] : NULL;
}