本文整理汇总了PHP中EntryManager::fetchEntriesByPage方法的典型用法代码示例。如果您正苦于以下问题:PHP EntryManager::fetchEntriesByPage方法的具体用法?PHP EntryManager::fetchEntriesByPage怎么用?PHP EntryManager::fetchEntriesByPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EntryManager
的用法示例。
在下文中一共展示了EntryManager::fetchEntriesByPage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: intval
if (isset($_REQUEST['pg']) && is_numeric($_REQUEST['pg'])) {
$current_page = intval($_REQUEST['pg']);
}
$filter = NULL;
if (isset($_REQUEST['filter']) && $_REQUEST['filter'] != '') {
$filter = $_REQUEST['filter'];
}
if (!($section = $DB->fetchRow(0, "SELECT * FROM `tbl_sections` WHERE `id` = '" . intval($_REQUEST['_sid']) . "' LIMIT 1"))) {
$Admin->fatalError("Unknown Section", "<p>The Section you are looking for could not be found.</p>", true, true);
}
$section_id = intval($section['id']);
$section_primary_field = $section['primary_field'];
$GLOBALS['pageTitle'] = $section['name'];
$sql = "SELECT * " . "FROM tbl_authors " . "ORDER BY username ASC";
$authors = $DB->fetch($sql);
list($entry_count_total, $entry_count_remaining, $entries) = $entryManager->fetchEntriesByPage($section_id, $current_page, $Admin->getConfigVar('pagination_maximum_rows', 'symphony'), $filter);
$sql = "SELECT t2.*\n\t\t\tFROM `tbl_sections_visible_columns` as t1\n\t\t\tLEFT JOIN `tbl_customfields` as t2 ON t1.field_id = t2.id\n\t\t\tWHERE t1.section_id = {$section_id}\n\t\t\tORDER BY t2.sortorder ASC\n\t\t\t";
$result = $DB->fetch($sql);
$columns = array();
if (is_array($result) && !empty($result)) {
foreach ($result as $r) {
$columns[] = array("title" => $r['name'], "field_id" => $r['id']);
}
}
if ($section['author_column'] == 'show') {
$columns[] = array("title" => 'Author', "field_id" => NULL);
}
if ($section['date_column'] == 'show') {
$columns[] = array("title" => 'Date Published', "field_id" => NULL);
}
if ($section['commenting'] == 'on') {