public function MenuTreeStorage::getMenuNames

public MenuTreeStorage::getMenuNames()

Returns the used menu names in the tree storage.

Return value

array The menu names.

Overrides MenuTreeStorageInterface::getMenuNames

File

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

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\Core\Menu

Code

public function getMenuNames() {
  $query = $this->connection->select($this->table, $this->options);
  $query->addField($this->table, 'menu_name');
  $query->distinct();
  return $this->safeExecuteSelect($query)->fetchAllKeyed(0, 0);
}

© 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::getMenuNames/8.1.x