PHP code example of srdjan92 / yii2-floating-menu

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

    

srdjan92 / yii2-floating-menu example snippets




// basic example of floating widget

echo \srdjan\floatingmenu\FloatingMenu::widget([
    'toggleOptions' => [
        'collapseOptions' => ['class' => 'fal fa-arrow-alt-left'],
        'expandOptions' => ['class' => 'fal fa-arrow-alt-right']
    ],
    'items' => [
        [
            'url' => ['site/index'],
            'label' => "<i class='fal fa-envelope'></i> <span>Messages</span>"
        ],
        [
            'url' => ['/notification/index'],
            'label' => "<i class='fal fa-bell'></i> <span>Notifications</span>"
        ],
        [
            'url' => ['/account/profile'],
            'label' => "<i class='fal fa-user'></i> <span>Profile</span>"
        ],
        [
            'url' => ['/settings/disapprove'],
            'label' => "<i class='fal fa-users'></i> <span>Fans</span>"
        ],
        [
            'url' => ['/settings/approve'],
            'label' => "<i class='fal fa-user'></i> <span>Club</span>"
        ],
        [
            'url' => ['/settings/index'],
            'label' => "<i class='fal fa-cog'></i> <span>Settings</span>"
        ],
    ]
]);