本文整理汇总了PHP中PageTheme::setPropertiesFromArray方法的典型用法代码示例。如果您正苦于以下问题:PHP PageTheme::setPropertiesFromArray方法的具体用法?PHP PageTheme::setPropertiesFromArray怎么用?PHP PageTheme::setPropertiesFromArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageTheme
的用法示例。
在下文中一共展示了PageTheme::setPropertiesFromArray方法的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;
}
}