PHP code example of bajzany / navigation-menu
1. Go to this page and download the library: Download bajzany/navigation-menu 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/ */
bajzany / navigation-menu example snippets
use Bajzany\NavigationMenu\MenuFactory;
/**
* @var MenuFactory @inject
*/
public $SaleMenu;
public function createComponentSaleMenu()
{
$menu = new Menu('Seznam sekcí');
$saleItemId = $this->getParameter('id');
$menu->createItem('Detail', ":Admin:SaleItem:detail", ['id' => $saleItemId]);
return $this->SaleMenu->createMenu($menu);
}