Exemplo n.º 1
0
 public function init()
 {
     parent::init();
     // enable content compression to remove whitespace when YII_DEBUG is disabled.
     if (!YII_DEBUG && YII_ENV == 'prod' && $this->module->enableCompression) {
         $this->view->on(View::EVENT_AFTER_RENDER, [$this, 'minify']);
     }
 }
Exemplo n.º 2
0
 public function init()
 {
     parent::init();
     // set the current path to activeUrl
     //Yii::$app->links->activeUrl = Yii::$app->request->get('path', null);
     if (!YII_DEBUG && YII_ENV == 'prod' && $this->module->enableCompression) {
         $this->view->on(View::EVENT_AFTER_RENDER, [$this, 'minify']);
     }
 }
Exemplo n.º 3
0
 public function init()
 {
     parent::init();
     // set the current path to activeUrl
     Yii::$app->links->activeUrl = isset($_GET['path']) ? $_GET['path'] : null;
     // @todo should we use Yii::$app->request->get('path', null); instead?
     if (!YII_DEBUG && YII_ENV == 'prod') {
         $this->view->on(View::EVENT_AFTER_RENDER, [$this, 'minify']);
     }
 }