public function findLayoutFile($view) { if ($this->layout === null && $this->ajaxLayout !== false && Yii::$app->getRequest()->getIsAjax()) { $this->layout = $this->ajaxLayout; } return parent::findLayoutFile($view); }
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); } }