public function MongodbMenuTreeStorage::menuNameInUse in MongoDB 8
Determines whether a specific menu name is used in the tree.
Parameters
string $menu_name: The menu name.
Return value
bool Returns TRUE if the given menu name is used, otherwise FALSE.
Overrides MenuTreeStorage::menuNameInUse
File
- src/
MongodbMenuTreeStorage.php, line 384 - Contains \Drupal\mongodb\MongodbMenuTreeStorage .
Class
Namespace
Drupal\mongodbCode
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);
}