コード例 #1
0
ファイル: CiiController.php プロジェクト: fandikurnia/CiiMS
 /**
  * Retrieves the appropriate theme
  * @return string $theme
  */
 public function getTheme()
 {
     $theme = Cii::getConfig('theme', 'default');
     // Allow for mobile devices to have a separate theme
     if (MobileDetect::isMobileDevice() && !Mobiledetect::isTabletDevice()) {
         $mobileTheme = Cii::getConfig('mobileTheme');
         if ($mobileTheme != NULL && $mobileTheme != "") {
             $theme = $mobileTheme;
         }
     }
     // Allow for tablet devices to have a separate theme from desktop and mobile
     if (MobileDetect::isTabletDevice()) {
         $tabletTheme = Cii::getConfig('tabletTheme');
         if ($tabletTheme != NULL && $tabletTheme != "") {
             $theme = $tabletTheme;
         }
     }
     return $theme;
 }