protected function CoffeeConfigurationForm::getMenuLabels in Coffee 8
Return an associative array of menus names.
Return value
array An array with the machine-readable names as the keys, and human-readable titles as the values.
1 call to CoffeeConfigurationForm::getMenuLabels()
- CoffeeConfigurationForm::buildForm in src/
Form/ CoffeeConfigurationForm.php - Form constructor.
File
- src/
Form/ CoffeeConfigurationForm.php, line 77
Class
- CoffeeConfigurationForm
- Configure Coffee for this site.
Namespace
Drupal\coffee\FormCode
protected function getMenuLabels() {
$menus = [];
foreach (Menu::loadMultiple() as $menu_name => $menu) {
$menus[$menu_name] = $menu
->label();
}
asort($menus);
return $menus;
}