for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace backend\widgets\control;
use yii\bootstrap\Widget;
use yii\web\JsExpression;
/**
* Class ControlSidebar
* @package backend\themes\AdminLTE\widgets
*/
class ControlSidebar extends Widget
{
* @var bool
public $status = true;
public $demo = false;
* @inheritdoc
public function run()
if ($this->status === true) {
$this->registerAssets();
echo $this->render('controlSidebar');
}
public function registerAssets()
$view = $this->getView();
$script = new JsExpression("
$('a[href=\"#control-sidebar-home-tab\"]').parent().removeClass('active');
$('#control-sidebar-home-tab').removeClass('active');
");
if ($this->demo === true) {
DemoAsset::register($view);
$view->registerJs($script);