Example #1
0
 public function findLayoutFile($view)
 {
     if ($this->layout === null && $this->ajaxLayout !== false && Yii::$app->getRequest()->getIsAjax()) {
         $this->layout = $this->ajaxLayout;
     }
     return parent::findLayoutFile($view);
 }
Example #2
0
 public function findLayoutFile($view)
 {
     if ($view instanceof BaseView && !empty($view->layout)) {
         $oldLayout = $this->layout;
         $this->layout = $view->layout;
         $file = parent::findLayoutFile($view);
         $this->layout = $oldLayout;
         return $file;
     } else {
         return parent::findLayoutFile($view);
     }
 }