/** * Finds the view file for the specified controller's view. * @param CController $controller the controller * @param string $viewName the view name * @return string the view file path. False if the file does not exist. */ public function getViewFile($controller, $viewName) { $moduleViewPath = $this->getViewPath(); if (($module = $controller->getModule()) !== null) { $moduleViewPath .= '/' . $module->getId(); } return $controller->resolveViewFile($viewName, $this->getViewPath() . '/' . $controller->getUniqueId(), $this->getViewPath(), $moduleViewPath); }
/** * @param CController $controller the controller * @return boolean whether the rule applies to the controller */ protected function isControllerMatched($controller) { return empty($this->controllers) || in_array(strtolower($controller->getUniqueId()), $this->controllers); }