mithun12000/yii2-urlasset Url Asset for Yii2 just like AssetBundle except it will work for creating menu for site module dynamically.

helperurlassetview

Yii2-UrlAsset

Url Asset for Yii2 just like AssetBundle except it will work for creating menu for site module dynamically.

Installation

Using composer

"require": {
    ...other dependency...  
    "mithun12000/yii2-urlasset":"*"
},

Add as extension. Code:


'UrlAsset' => 
  [
    'name' => 'UrlAsset',
    'version' => '1.0',
    'alias' => 
    [
      '@yii/UrlAsset/' => [EXTENSION_PATH] '/UrlAsset',
    ],
  ],

Configure

In Layout / view file.

use Yii\UrlAsset\component\UrlAsset;
$urls = new UrlAsset(['assetFile'=>'AppUrlAsset']); //default file for search is AppUrlAsset.php with namespace can be configurable. 
$urls->registerAll($this);
$urls->setParams($this);

//to get all menu item.
$menuitems = $this->params['urls'];

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

Comments



1.0.0 is the latest of one release



GPLv2 license
Stats
1 github stars & 2 github forks
0 downloads in the last day
3 downloads in the last 30 days
617 total downloads