PHP code example of chapcz / navigation
1. Go to this page and download the library: Download chapcz/navigation library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
chapcz / navigation example snippets
use Kollarovic\Navigation\ItemsFactory;
use Kollarovic\Navigation\NavigationControl;
use Kollarovic\Navigation\SitemapControl;
abstract class BasePresenter extends Nette\Application\UI\Presenter
{
/** @var \Kollarovic\Navigation\ItemsFactory @inject */
public $itemsFactory;
protected function createComponentNavigation()
{
return new NavigationControl($this->itemsFactory->create('backend'));
}
protected function createComponentSitemap()
{
return new SitemapControl($this->itemsFactory->create('backend'));
}
}
{control navigation:menu}
{control navigation:breadcrumb}
{control navigation:panel}
{control sitemap}