You are here

public function MenuTreeStorage::getMenuNames in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Menu/MenuTreeStorage.php \Drupal\colossal_menu\Menu\MenuTreeStorage::getMenuNames()

Returns the used menu names in the tree storage.

Return value

array The menu names.

Overrides MenuTreeStorageInterface::getMenuNames

File

src/Menu/MenuTreeStorage.php, line 362

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\colossal_menu\Menu

Code

public function getMenuNames() {
  return $this->connection
    ->select($this->storage
    ->getEntityType()
    ->get('base_table'), 'e')
    ->distinct()
    ->fields('e', [
    'menu',
  ])
    ->execute()
    ->fetchCol();
}