PHP code example of stepapo / menu

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

    

stepapo / menu example snippets


public function createComponentMainMenu(): MenuControl
{
    $menu = Menu::createFromNeon(__DIR__ . '/mainMenu.yml', [
        'hideAdmin' => !$this->user->isInRole('admin')
    ]);
    return new MenuControl($menu);
}