PHP code example of extpoint / yii2-megamenu

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

    

extpoint / yii2-megamenu example snippets


...
'bootstrap' => ['log', 'megamenu'],
...

'components' => [
    'megaMenu'=> [
        'class' => '\extpoint\megamenu\MegaMenu',
        'items' => [
            // sitemap
        ],
    ],
    ...
],

isUrlEquals('http://google.com', 'http://google.com') // true
isUrlEquals(['/qq/ww/ee'], ['/aa/bb/cc']) // false
isUrlEquals(['/aa/bb/cc', 'foo' => null], ['/aa/bb/cc']) // false
isUrlEquals(['/aa/bb/cc', 'foo' => null], ['/aa/bb/cc', 'foo' => null]) // true
isUrlEquals(['/aa/bb/cc', 'foo' => 'qwe'], ['/aa/bb/cc', 'foo' => null]) // true
isUrlEquals(['/aa/bb/cc', 'foo' => 'qwe'], ['/aa/bb/cc', 'foo' => '555']) // false