public function renderCheeseburgerMenuBlock::getAllTaxonomyTermNames in Cheeseburger Menu 8
Same name and namespace in other branches
- 8.4 src/Controller/RenderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock::getAllTaxonomyTermNames()
- 8.2 src/Controller/RenderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock::getAllTaxonomyTermNames()
- 8.3 src/Controller/RenderCheeseburgerMenuBlock.php \Drupal\cheeseburger_menu\Controller\RenderCheeseburgerMenuBlock::getAllTaxonomyTermNames()
Return value
all taxonomy term translated names
File
- src/
Controller/ renderCheeseburgerMenuBlock.php, line 463
Class
Namespace
Drupal\cheeseburger_menu\ControllerCode
public function getAllTaxonomyTermNames() {
$all_taxonomies = \Drupal::entityTypeManager()
->getStorage('taxonomy_vocabulary')
->loadMultiple();
$menus = [];
foreach ($all_taxonomies as $id => $menu) {
$menus[$id] = $menu
->label();
}
asort($menus);
return $menus;
}