本文整理匯總了PHP中PageTheme::getPackageHandle方法的典型用法代碼示例。如果您正苦於以下問題:PHP PageTheme::getPackageHandle方法的具體用法?PHP PageTheme::getPackageHandle怎麽用?PHP PageTheme::getPackageHandle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PageTheme
的用法示例。
在下文中一共展示了PageTheme::getPackageHandle方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: populateThemeQuery
protected function populateThemeQuery($where, $args) {
$db = Loader::db();
$row = $db->GetRow("select ptID, ptHandle, ptDescription, pkgID, ptName from PageThemes where {$where}", $args);
if ($row['ptID']) {
$pl = new PageTheme;
$pl->setPropertiesFromArray($row);
$pkgHandle = $pl->getPackageHandle();
if ($row['pkgID'] > 0) {
if (is_dir(DIR_PACKAGES . '/' . $pkgHandle)) {
$pl->ptDirectory = DIR_PACKAGES . '/' . $pkgHandle . '/' . DIRNAME_THEMES . '/' . $row['ptHandle'];
$url = BASE_URL . DIR_REL;
} else {
$pl->ptDirectory = DIR_PACKAGES_CORE . '/' . $pkgHandle . '/' . DIRNAME_THEMES . '/' . $row['ptHandle'];
$url = ASSETS_URL;
}
$pl->ptURL = $url . '/' . DIRNAME_PACKAGES . '/' . $pkgHandle . '/' . DIRNAME_THEMES . '/' . $row['ptHandle'];
} else if (is_dir(DIR_FILES_THEMES . '/' . $row['ptHandle'])) {
$pl->ptDirectory = DIR_FILES_THEMES . '/' . $row['ptHandle'];
$pl->ptURL = BASE_URL . DIR_REL . '/' . DIRNAME_THEMES . '/' . $row['ptHandle'];
} else {
$pl->ptDirectory = DIR_FILES_THEMES_CORE . '/' . $row['ptHandle'];
$pl->ptURL = ASSETS_URL . '/' . DIRNAME_THEMES . '/' . $row['ptHandle'];
}
return $pl;
}
}