You are here

public function renderCheeseburgerMenuBlock::getAllTaxonomyTermIds in Cheeseburger Menu 8

Same name and namespace in other branches
  1. 8.2 src/Controller/RenderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock::getAllTaxonomyTermIds()
  2. 8.3 src/Controller/RenderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock::getAllTaxonomyTermIds()

Return value

all menu translated id

1 call to renderCheeseburgerMenuBlock::getAllTaxonomyTermIds()
renderCheeseburgerMenuBlock::render_tree in src/Controller/renderCheeseburgerMenuBlock.php

File

src/Controller/renderCheeseburgerMenuBlock.php, line 479

Class

renderCheeseburgerMenuBlock

Namespace

Drupal\cheeseburger_menu\Controller

Code

public function getAllTaxonomyTermIds() {
  $all_taxonomies = \Drupal::entityTypeManager()
    ->getStorage('taxonomy_vocabulary')
    ->loadMultiple();
  $menus = [];
  foreach ($all_taxonomies as $id => $menu) {
    $menus[$menu
      ->label()] = $id;
  }
  asort($menus);
  return $menus;
}