function MenuTreeStorage::menuNameInUse

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::menuNameInUse()
  2. 10 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::menuNameInUse()
  3. 11.x core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::menuNameInUse()

Overrides MenuTreeStorageInterface::menuNameInUse

File

core/lib/Drupal/Core/Menu/MenuTreeStorage.php, line 1036

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

public function menuNameInUse($menu_name) {
    $query = $this->connection
        ->select($this->table, NULL, $this->options);
    $query->addField($this->table, 'mlid');
    $query->condition('menu_name', $menu_name);
    $query->range(0, 1);
    return (bool) $this->safeExecuteSelect($query);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.