本文整理汇总了PHP中Layout::getThemeDirRoot方法的典型用法代码示例。如果您正苦于以下问题:PHP Layout::getThemeDirRoot方法的具体用法?PHP Layout::getThemeDirRoot怎么用?PHP Layout::getThemeDirRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Layout
的用法示例。
在下文中一共展示了Layout::getThemeDirRoot方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTplDir
/**
* Grabs the THEME template directory unless layout is not
* operational
*/
public static function getTplDir($module)
{
if ($module == 'core') {
return PHPWS_SOURCE_DIR . 'core/templates/';
}
if (!class_exists('Layout')) {
return PHPWS_SOURCE_DIR . "mod/{$module}/templates/";
}
$theme = Layout::getThemeDirRoot() . Layout::getTheme();
return sprintf('%s/templates/%s/', $theme, $module);
}
示例2: loadTheme
/**
* Inserts the content data into the current theme
*/
public static function loadTheme($theme, $template)
{
$tpl = new PHPWS_Template();
$tpl->setRoot(PHPWS_SOURCE_DIR);
$themeDir = Layout::getThemeDir();
if (PHPWS_Error::isError($themeDir)) {
PHPWS_Error::log($themeDir);
PHPWS_Core::errorPage();
}
$result = $tpl->setFile($themeDir . 'theme.tpl', TRUE);
if (PHPWS_Error::isError($result)) {
return $result;
}
if (!empty($GLOBALS['Layout_Collapse'])) {
$template['COLLAPSE'] = 'id="layout-collapse"';
}
$template['THEME_DIRECTORY'] = Layout::getThemeDirRoot() . $theme . '/';
$template['THEME_HTTP'] = Layout::getThemeHttpRoot() . $theme . '/';
$template['SOURCE_THEME_HTTP'] = PHPWS_SOURCE_HTTP . 'themes/';
$template['SOURCE_THEME_DIR'] = PHPWS_SOURCE_DIR . 'themes/';
$tpl->setData($template);
return $tpl;
}
示例3: getThemeList
public static function getThemeList()
{
PHPWS_Core::initCoreClass('File.php');
return PHPWS_File::readDirectory(Layout::getThemeDirRoot(), 1);
}
示例4: loadSettings
public function loadSettings($theme = null)
{
$db = new PHPWS_DB('layout_config');
$result = $db->loadObject($this, false);
if (PHPWS_Error::isError($result)) {
PHPWS_Error::log($result);
PHPWS_Core::errorPage();
}
if ($theme && is_dir(Layout::getThemeDirRoot() . $theme)) {
$this->default_theme = $theme;
}
if (empty($this->current_theme)) {
$this->current_theme = $this->default_theme;
}
$themeInit = Layout::getThemeDirRoot() . $this->current_theme . '/theme.ini';
if (is_file($themeInit)) {
$themeVars = parse_ini_file($themeInit, true);
$this->loadBoxSettings($themeVars);
$this->loadStyleSheets($themeVars);
} else {
PHPWS_Error::log(LAYOUT_INI_FILE, 'layout', 'Layout_Settings::loadSettings', $themeInit);
//PHPWS_Core::errorPage();
}
if (Current_User::isDeity()) {
$this->deity_reload = true;
}
}