src/Application.php
public function getCurrentTheme()
    {
        if ($this->_currentTheme != null) {
            return $this->_currentTheme;
        }
        $currentTheme = "";
        if (isset($_GET['theme'])) {
            $currentTheme = $_GET['theme'];
        }
        if ($currentTheme == "") {
            $currentTheme = $this->getSessionContext()->getVar("THEME");
        }
        if ($currentTheme == "") {
            $currentTheme = $this->getUserPreference("theme");
        }
        if ($currentTheme == "" && defined('OPENBIZ_THEME_NAME')) {
            $currentTheme = OPENBIZ_THEME_NAME;
        }
        if ($currentTheme == "") {
            $currentTheme = self::DEFAULT_THEME;
        }
        $this->getSessionContext()->setVar("THEME", $currentTheme);
        $this->_currentTheme = $currentTheme;
        return $currentTheme;
    }
public function getCurrentTheme()
    {
        if ($this->_currentTheme != null) {
            return $this->_currentTheme;
        }
        $currentTheme = "";
        if (isset($_GET['theme'])) {
            $currentTheme = $_GET['theme'];
        }
        if ($currentTheme == "") {
            $currentTheme = $this->getSessionContext()->getVar("THEME");
        }
        if ($currentTheme == "") {
            $currentTheme = $this->getUserPreference("theme");
        }
        if ($currentTheme == "" && defined('OPENBIZ_THEME_NAME')) {
            $currentTheme = OPENBIZ_THEME_NAME;
        }
        if ($currentTheme == "") {
            $currentTheme = self::DEFAULT_THEME;
        }
        $this->getSessionContext()->setVar("THEME", $currentTheme);
        $this->_currentTheme = $currentTheme;
        return $currentTheme;
    }
theme selection priority: url, session, userpref, system(constant)
@todo user pereference has language setting
@return type