/** * @inheritdoc * * @author zalatov.a */ protected function findViewFile($view, $context = null) { $path = parent::findViewFile($view, $context); $path = str_replace(['\\', '/'], '/', $path); if (1 === preg_match('/^(.*)\\/[^\\/]+\\/modules\\/([^\\/]+)\\/views\\/(.*)$/', $path, $matches)) { $path = '@app/modules/' . $matches[2] . '/' . $matches[3]; } elseif (1 === preg_match('/^(.*)\\/[^\\/]+\\/modules\\/([^\\/]+)\\/widgets\\/views\\/(.*)$/', $path, $matches)) { $path = '@app/modules/' . $matches[2] . '/widgets/' . $matches[3]; } return $path; }
/** * Changes: * * * if view file does not exist, find view file using $this as context. * * @inheritdoc */ protected function findViewFile($view, $context = null) { $path = parent::findViewFile($view, $context); if ($this->theme !== null) { $path = $this->theme->applyTo($path); } if (!is_file($path)) { //find default view file return $this->findDefaultViewFile($view, $context); } return FileHelper::localize($path); }