nattreid / menu
Menu for Nette Framework
2.5.6
2020-04-30 06:31 UTC
Requires
- php: >= 7.1
- nattreid/breadcrumbs: ~1.0
- nattreid/security: ~1.0
- nattreid/utils: ~1.0
- nette/application: ~2.4
- nette/di: ~2.4
Requires (Dev)
- nette/tester: ~1.7
- tracy/tracy: ~2.4
- dev-master / 2.x-dev
- 2.5.6
- 2.5.1
- 2.5.0
- 2.4.0
- 2.3.1
- 2.3.0
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2.0
- 2.1.9
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.19
- 2.0.18
- 2.0.17
- 2.0.16
- 2.0.15
- 2.0.14
- 2.0.13
- 2.0.12
- 2.0.11
- 2.0.10
- 2.0.9
- 2.0.8.3
- 2.0.8.2
- 2.0.8.1
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5.2
- 2.0.5.1
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-12-13 16:30:21 UTC
README
Nastavení v config.neon
Pokud chcete využít nastavení menu přes config.neon
extensions: menu: NAttreid\Menu\DI\MenuExtension menu: items: module: # hlavni modul (front, cms) data: # namespace modulu link: 'Homepage:' # link na HP modulu group: # skupina page: # presenter link: action # link akci presenteru, nebo null pro default arguments: {name: value} # argumenty toBlank: TRUE # otevre do noveho okna count: 5 # pocet za linkem # nebo count: @SomeClass::countUnapproved() # pocet za linkem # nebo count: {5, info} # muze byt info, warning (info je default)
nebo postačí pouze zaregistrovat továrnu
services: - NAttreid\Menu\IMenuFactory
Použití
/** @var \NAttreid\Menu\IMenuFactory @inject */ public $menuFactory; function createComponentMenu() { $menu = $this->menuFactory->create(); $link = $menu->addLink('test', 'Test:test'); $group = $link->addGroup('group'); // ... atd return $menu; }
Drobečková navigace
protected function createComponentBreadcrumb() { $breadcrumb = $this['menu']->getBreadcrumb(); return $breadcrumb; }