getTheme() public static method

Gets the active theme name
public static getTheme ( ) : string
return string
Beispiel #1
0
 /**
  * Parse Facebook related header-data
  */
 private function parseFacebook()
 {
     $parseFacebook = false;
     $facebookAdminIds = $this->get('fork.settings')->get('Core', 'facebook_admin_ids', null);
     $facebookAppId = $this->get('fork.settings')->get('Core', 'facebook_app_id', null);
     // check if facebook admins are set
     if ($facebookAdminIds !== null) {
         $this->addMetaData(array('property' => 'fb:admins', 'content' => $facebookAdminIds), true, array('property'));
         $parseFacebook = true;
     }
     // check if no facebook admin is set but an app is configured we use the application as an admin
     if ($facebookAdminIds == '' && $facebookAppId !== null) {
         $this->addMetaData(array('property' => 'fb:app_id', 'content' => $facebookAppId), true, array('property'));
         $parseFacebook = true;
     }
     // should we add extra open-graph data?
     if ($parseFacebook) {
         // build correct locale
         switch (FRONTEND_LANGUAGE) {
             case 'en':
                 $locale = 'en_US';
                 break;
             case 'zh':
                 $locale = 'zh_CN';
                 break;
             case 'cs':
                 $locale = 'cs_CZ';
                 break;
             case 'el':
                 $locale = 'el_GR';
                 break;
             case 'ja':
                 $locale = 'ja_JP';
                 break;
             case 'sv':
                 $locale = 'sv_SE';
                 break;
             case 'uk':
                 $locale = 'uk_UA';
                 break;
             default:
                 $locale = strtolower(FRONTEND_LANGUAGE) . '_' . strtoupper(FRONTEND_LANGUAGE);
         }
         $this->addOpenGraphData('locale', $locale);
         // if a default image has been set for facebook, assign it
         $this->addOpenGraphImage('/frontend/themes/' . Theme::getTheme() . '/facebook.png');
         $this->addOpenGraphImage('/facebook.png');
     }
 }
Beispiel #2
0
 /**
  * Get path to map styles
  *
  * @param boolean $backend
  * @return string
  */
 public static function getPathToMapStyles($backend = true)
 {
     $path = 'src/Frontend';
     $jsFile = 'Location/Js/LocationMapStyles.js';
     $moveToPath = '../../../../..';
     // User can override the map styles in the frontend
     if (file_exists($path . '/Themes/' . FrontendTheme::getTheme() . '/Modules/' . $jsFile)) {
         if ($backend) {
             return $moveToPath . '/' . $path . '/Themes/' . FrontendTheme::getTheme() . '/Modules/' . $jsFile;
         }
         return '/' . $path . '/Themes/' . FrontendTheme::getTheme() . '/Modules/' . $jsFile;
     }
     if ($backend) {
         return $moveToPath . '/' . $path . '/Modules/' . $jsFile;
     }
     return '/' . $path . '/Modules/' . $jsFile;
 }