public MenuTreeStorage::menuNameInUse($menu_name)
Determines whether a specific menu name is used in the tree.
string $menu_name: The menu name.
bool Returns TRUE if the given menu name is used, otherwise FALSE.
Overrides MenuTreeStorageInterface::menuNameInUse
public function menuNameInUse($menu_name) { $query = $this->connection->select($this->table, $this->options); $query->addField($this->table, 'mlid'); $query->condition('menu_name', $menu_name); $query->range(0, 1); return (bool) $this->safeExecuteSelect($query); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuTreeStorage.php/function/MenuTreeStorage::menuNameInUse/8.1.x