コード例 #1
0
ファイル: DefaultController.php プロジェクト: boehsermoe/luya
 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']);
     }
 }
コード例 #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']);
     }
 }
コード例 #3
0
ファイル: DefaultController.php プロジェクト: efueger/luya
 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']);
     }
 }