コード例 #1
0
ファイル: HTheme.php プロジェクト: alefernie/intranet
 public function getViewFile($controller, $viewName)
 {
     if (strpos($viewName, '.')) {
         return $this->getViewFileAliased($viewName);
     } else {
         return parent::getViewFile($controller, $viewName);
     }
 }
コード例 #2
0
ファイル: Theme.php プロジェクト: Jmainguy/multicraft_install
 public function getViewPath()
 {
     if ($this->_vpath) {
         return $this->_vpath;
     }
     if (preg_match('/platform' . preg_quote(DIRECTORY_SEPARATOR, '/') . '/', $this->name)) {
         $this->_vpath = Yii::app()->basePath . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . $this->name;
     } else {
         $this->_vpath = CTheme::getViewPath();
     }
     return $this->_vpath;
 }
コード例 #3
0
ファイル: Theme.php プロジェクト: uiDeveloper116/webstore
 /**
  * Depending on if we have customized the file, return the URL
  * @param $cssFile
  * @return string
  */
 public function getCssUrl($cssFile)
 {
     // Just in case someone passed the .css as part of the $cssFile
     if (substr($cssFile, strlen($cssFile) - 4, 4) == ".css") {
         $cssFile = substr($cssFile, 0, -4);
     }
     // new install?
     if (!is_array(Yii::app()->theme->config->activecss)) {
         return parent::getBaseUrl() . "/css/" . $cssFile . ".css";
     }
     $arrActiveCss = Yii::app()->theme->config->activecss;
     if ($this->hasAdminForm(Yii::app()->theme->name)) {
         if (in_array($cssFile, $arrActiveCss)) {
             if ($cssFile !== 'custom') {
                 return parent::getBaseUrl() . "/css/" . $cssFile . ".css";
             } else {
                 return str_replace("http:", "", _xls_custom_css_folder()) . "_customcss/" . Yii::app()->theme->name . "/" . $cssFile . ".css";
             }
         }
     } else {
         return parent::getBaseUrl() . "/css/" . $cssFile . ".css";
     }
 }