Example #1
0
 public static function setDomainTheme()
 {
     $container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer');
     // Wui theme
     //
     $user_settings = new \Innomatic\Domain\User\UserSettings($container->getCurrentDomain()->getDataAccess(), $container->getCurrentUser()->getUserId());
     $user_theme = $user_settings->getKey('wui-theme', true);
     if (!strlen($user_theme)) {
         $app_cfg = new \Innomatic\Application\ApplicationSettings('innomatic');
         if (strlen($app_cfg->getKey('wui-root-theme'))) {
             $user_theme = $app_cfg->getKey('wui-root-theme');
             if (!strlen($user_theme)) {
                 $user_theme = \Innomatic\Wui\Wui::DEFAULT_THEME;
             }
         } else {
             $user_theme = \Innomatic\Wui\Wui::DEFAULT_THEME;
         }
         unset($app_cfg);
     }
     \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui')->setTheme($user_theme);
 }
Example #2
0
 public function getCountry()
 {
     $user_settings = new \Innomatic\Domain\User\UserSettings($this->domainDA, $this->container->getCurrentUser()->getUserId());
     $country = $user_settings->getKey('desktop-country');
     return strlen($country) ? $country : $this->container->getCurrentDomain()->getCountry();
 }