1. Go to this page and download the library: Download kregel/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/ */
class MyFramework extends Kregel\Menu\Interfaces\AbstractMenu{
public function add(Array $options)
{
// This will add each actual menu item to the menu variable
}
public function addDropdown($dropdown_name, $elements)
{
// This will build a dropdown ($elements should be an arary
}
public function devour()
{
// Should return the menu item
}
public function buildMenu($menu)
{
// This should build the actual menu. For the config file I have
// And you would call it like
// $menu->using('myframework')->buildMenu(['Home'=>'/']->devour()
}
public function config()
{
// This would be how you handle your framework pulling form the config file.
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.