本文整理汇总了PHP中Paging::setLinkFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP Paging::setLinkFormat方法的具体用法?PHP Paging::setLinkFormat怎么用?PHP Paging::setLinkFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Paging
的用法示例。
在下文中一共展示了Paging::setLinkFormat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: empty
<?php
$attributes['order'] = empty($attributes['order']) ? "code" : $attributes['order'];
$attributes['pagesize'] = empty($attributes['pagesize']) ? $oSettingsManager->getValue("AdminTableSize", 25, "INT", "Number of elements in tables of administrator backend") : (int) $attributes['pagesize'];
if (!isset($attributes['sort'])) {
$attributes['sort'] = "ASC";
} else {
if (!in_array($attributes['sort'], array("ASC", "DESC"))) {
$attributes['sort'] = "ASC";
}
}
$attributes['asort'] = $attributes['sort'] == "ASC" ? "DESC" : "ASC";
$attributes['page'] = empty($attributes['page']) ? 1 : (int) $attributes['page'];
$oPaging = new Paging($attributes['pagesize'], $oLanguageManager->getLanguagesCount(), $attributes['page']);
$oPaging->setLinkFormat($here . "&page=%d");
$arrPageSizes = array(10, 25, 50, 100, 200);
if ($arrLanguages = $oLanguageManager->getLanguages($attributes['order'], $attributes['sort'], $oPaging->getOffSet(), $oPaging->getPageSize())) {
_assign("arrLanguages", $arrLanguages);
_assign("arrPages", $oPaging->getPages());
_assign("arrPageSizes", $arrPageSizes);
}
_display("admin/dspLanguages.tpl");
示例2: empty
<?php
$attributes['page_size'] = empty($attributes['page_size']) ? $oSettingsManager->getValue("GalleryPicutresOnPage", 12, "INT", "Number of pictures in gallery page") : intval($attributes['page_size']);
$attributes['page'] = empty($attributes['page']) ? 1 : intval($attributes['page']);
if (!empty($attributes['gallery'])) {
if ($ogGalleryManager->checkGallery($attributes['gallery'])) {
$arrGalleries = $ogGalleryManager->getGalleries();
$oPaging = new Paging($attributes['page_size'], $ogGalleryManager->getImagesCount($attributes['gallery']), $attributes['page']);
$arrImages = $ogGalleryManager->getImages($attributes['gallery'], $oPaging->getOffSet(), $oPaging->getPageSize());
$oPaging->setLinkFormat($attributes['gallery'] . '.gallery/' . "%d");
$intAuthorID = $ogGalleryManager->getGalleryAuthorID($attributes['gallery']);
$intEditorID = $ogGalleryManager->getGalleryEditorID($attributes['gallery']);
$oAuthor = false;
$oEditor = false;
if ($intAuthorID) {
$oAuthor = $oUserManager->getUserByID($intAuthorID);
}
if ($intEditorID) {
$oEditor = $oUserManager->getUserByID($intEditorID);
}
if ($oAuthor) {
_assign('oAuthor', $oAuthor);
}
if ($oEditor) {
_assign('oEditor', $oEditor);
}
_assign("arrPages", $oPaging->getPages());
_assign("arrGalleries", $arrGalleries);
_assign("arrImages", $arrImages);
_display("home/dspGallery.tpl");
} else {