PHP code example of skylineos / yii-menu

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

    

skylineos / yii-menu example snippets


'modules' => [
    'menu' => [
        'class' => 'skylineos\yii\menu\Module',
        'viewPath' => '@app/path/to/my/admin/views', // eg. @app/modules/cms/views. The system looks for [menu|menu-item] folders
        'roles' => ['@'], // optional yii authorization roles
        'dropdownClass' => 'app\path\to\dropDownClass', // @see https://www.yiiframework.com/extension/yiisoft/yii2-bootstrap4/doc/api/2.0/yii-bootstrap4-dropdown

        /**
         * Additional templates can be added as such: (namespace => display/friendly name)
         * @see [Building Templates]
         */
        'templates' => [
            'skylineos\yii\menu\widgets\SkyMenuWidget' => 'Useful for simple demo',
            'app\widgets\menus\OtherMenuWidget' => 'My Other Custom Widget',
        ],
        
        'targets' => [
            // See 'Defining Targets'
        ]
    ],
],