public function MenuTreeStorage::getMenuNames in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/MenuTreeStorage.php \Drupal\Core\Menu\MenuTreeStorage::getMenuNames()
Returns the used menu names in the tree storage.
Return value
array The menu names.
Overrides MenuTreeStorageInterface::getMenuNames
1 call to MenuTreeStorage::getMenuNames()
- MenuTreeStorage::rebuild in core/
lib/ Drupal/ Core/ Menu/ MenuTreeStorage.php - Rebuilds the stored menu link definitions.
File
- core/
lib/ Drupal/ Core/ Menu/ MenuTreeStorage.php, line 1043
Class
- MenuTreeStorage
- Provides a menu tree storage using the database.
Namespace
Drupal\Core\MenuCode
public function getMenuNames() {
$query = $this->connection
->select($this->table, NULL, $this->options);
$query
->addField($this->table, 'menu_name');
$query
->distinct();
return $this
->safeExecuteSelect($query)
->fetchAllKeyed(0, 0);
}