PHP code example of mithun12000 / yii2-urlasset

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

    

mithun12000 / yii2-urlasset example snippets



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

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'];