本文整理汇总了PHP中source\libs\Resource::getHomeTheme方法的典型用法代码示例。如果您正苦于以下问题:PHP Resource::getHomeTheme方法的具体用法?PHP Resource::getHomeTheme怎么用?PHP Resource::getHomeTheme使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类source\libs\Resource
的用法示例。
在下文中一共展示了Resource::getHomeTheme方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTheme
public function setTheme()
{
$currentTheme = Resource::getHomeTheme();
$moduleId = LuLu::$app->controller->module->id;
$config = ['pathMap' => ['@app/views' => ['@statics/themes/' . $currentTheme . '/views', '@statics/themes/basic/views'], '@source/modules/' . $moduleId . '/home/views' => ['@statics/themes/' . $currentTheme . '/modules/' . $moduleId, '@statics/themes/basic/modules/' . $moduleId]], 'basePath' => '@statics/themes/basic', 'baseUrl' => '@statics/themes/basic'];
$this->theme = new Theme($config);
}
示例2: checkHomeThemeFile
public static function checkHomeThemeFile($fileName, $checkDefault = true)
{
$currentTheme = Resource::getHomeTheme();
$path = LuLu::getAlias('statics') . '/themes/' . $currentTheme . $fileName . '.php';
if (!FileHelper::exist($path) && $checkDefault) {
$currentTheme = 'd';
$path = LuLu::getAlias('statics') . '/themes/' . $currentTheme . $fileName . '.php';
} else {
return $currentTheme;
}
if (!FileHelper::exist($path)) {
return false;
}
return $currentTheme;
}