PHP code example of t4web / navigation

1. Go to this page and download the library: Download t4web/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/ */

    

t4web / navigation example snippets


'factories' => array(
      'UserNavigation' => function (ServiceLocatorInterface $sl) {
          $factory =  new T4webNavigation\Factory();
          return $factory->createService($sl);
      },
  )

public function onBootstrap(EventInterface $e)
{
    $sl = $e->getApplication()->getServiceLocator();
    $navigarot = $sl->get('T4webNavigation\Menu\Navigator');
    $navigator->addEntry('Dashboard', 'home', 'fa fa-dashboard');
    $navigator->addEntry('Employees', 'employees-list', 'fa fa-users');
    $navigator->addEntry(TITLE, ROUTE, ENTRY_ICON_CLASS);
}

<?= $this->navigation('UserNavigation')
    ->menu()->setUlClass('navigation')
    ->setPartial('navigation');