You are here

public function RenderCheeseburgerMenuBlock::getAllTaxonomyTermIds in Cheeseburger Menu 8.2

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

Get all taxonomy term ids.

1 call to RenderCheeseburgerMenuBlock::getAllTaxonomyTermIds()
RenderCheeseburgerMenuBlock::renderTree in src/Controller/RenderCheeseburgerMenuBlock.php
Render given tree.

File

src/Controller/RenderCheeseburgerMenuBlock.php, line 658
Controller used for rendering block.

Class

RenderCheeseburgerMenuBlock
Class RenderCheeseburgerMenuBlock.

Namespace

Drupal\cheeseburger_menu\Controller

Code

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