1. Go to this page and download the library: Download rybakit/navigation-bundle 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/ */
rybakit / navigation-bundle example snippets
public function registerBundles()
{
$bundles = [
...
new Rybakit\Bundle\RybakitNavigationBundle(),
];
...
}
php
use Rybakit\Bundle\NavigationBundle\Navigation\Item;
$root = new Item('root');
$child = new Item('child');
$root->add($child);
$parent = $child->getParent(); // $root
$has = $root->has($child); // true
$root->remove($child);