1. Go to this page and download the library: Download dmitrybtn/yii2-yimp 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/ */
dmitrybtn / yii2-yimp example snippets
'layout' => '@dmitrybtn/yimp/views/layout',
namespace app\components;
class Navigator extends \dmitrybtn\yimp\Navigator
{
public function init()
{
parent::init();
$this->menuLeft = [
['label' => 'Main menu'],
['label' => 'About', 'url' => ['/site/about']],
];
}
}
class SiteController extends \yii\web\Controller
{
public $nav;
public function init()
{
parent::init();
$this->nav = new Navigator();
}
public function actionAbout()
{
$this->nav->title = 'About';
...
}
}