本文整理汇总了PHP中source\LuLu::getAppParam方法的典型用法代码示例。如果您正苦于以下问题:PHP LuLu::getAppParam方法的具体用法?PHP LuLu::getAppParam怎么用?PHP LuLu::getAppParam使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类source\LuLu
的用法示例。
在下文中一共展示了LuLu::getAppParam方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTheme
public function setTheme()
{
$currentTheme = LuLu::getAppParam('adminTheme');
$moduleId = LuLu::$app->controller->module->id;
$config = ['pathMap' => ['@app/views' => ['@static/admin/' . $currentTheme . '/views'], '@source/modules/' . $moduleId . '/admin/views' => ['@static/admin/' . $currentTheme . '/modules/' . $moduleId]], 'baseUrl' => '@static/admin/' . $currentTheme];
$this->theme = new Theme($config);
}
示例2: getContentByChannel
public static function getContentByChannel($channelIds, $other = [])
{
$tableName = '';
$where = '';
$cachedChannels = LuLu::getAppParam('cachedChannels');
if (intval($channelIds) > 0) {
$channel = $cachedChannels[$channelIds];
$tableName = $channel['table'];
if (empty($tableName)) {
return [];
}
if ($channel['is_leaf']) {
$where = 'channel_id=' . $channelIds;
} else {
$leafIds = $channel['leaf_ids'];
if ($leafIds == '') {
return [];
}
$where = 'channel_id in(' . $leafIds . ')';
}
} else {
$channelIdArray = explode(',', $channelIds);
$tableName = $channel[$channelIdArray[0]];
if (empty($tableName)) {
return [];
}
$leafIds = '';
foreach ($channelIdArray as $id) {
$leafIds .= $cachedChannels[$id]['leaf_ids'] . ',';
}
$leafIdsArray = explode(',', rtrim($leafIds, ','));
$leafIdsArray = array_unique($leafIdsArray);
$leafIds = implode(',', $leafIdsArray);
$where = 'channel_id in(' . $leafIds . ')';
}
$query = self::buildContentQuery($tableName, $other, $where);
return $query->all();
}
示例3: getHomeTheme
public static function getHomeTheme()
{
$currentTheme = LuLu::getAppParam('homeTheme');
return $currentTheme;
}
示例4: getContentItemView
public static function getContentItemView($content)
{
$currentTheme = LuLu::getAppParam('homeTheme');
$ret = '@webroot/static/themes/' . $currentTheme . '/modules/' . $content['type'] . '/_inc/content_default';
return $ret;
}