本文整理汇总了PHP中PageList::displayPaging方法的典型用法代码示例。如果您正苦于以下问题:PHP PageList::displayPaging方法的具体用法?PHP PageList::displayPaging怎么用?PHP PageList::displayPaging使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PageList
的用法示例。
在下文中一共展示了PageList::displayPaging方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* Gets a list of all pages of the collection type
* specified by $ctID
*
* @param int $ctID ID of collection type
*/
public function show($ctID)
{
$hh = Loader::helper('html');
$th = Loader::helper('text');
$emptyList = false;
$this->view(false);
Loader::model('page_list');
$pl = new PageList();
$pl->filterByCollectionTypeID($ctID);
if (array_key_exists('cvName', $_REQUEST)) {
$cvName = $th->sanitize($_REQUEST['cvName']);
$this->set('cvName', $cvName);
$pl->filterByName($cvName);
if (count($pl->getPage()) <= 0) {
$pl = new PageList();
$emptyList = true;
}
}
if (!$emptyList) {
$pl->addtoQuery('left join Pages parent ON(p1.cParentID = parent.cID)');
$pl->sortByMultiple('parent.cDisplayOrder asc', 'p1.cDisplayOrder asc');
$pages = $pl->getPage();
} else {
$pages = '';
$this->set('emptyList', t('No entries found'));
}
$ct = CollectionType::getByID($ctID);
// add all necessary header items like JavaScript and CSS files
if (!array_key_exists('cvName', $_REQUEST) || $cvName == '') {
$this->addHeaderItem($hh->css('composer.sort.css', 'remo_composer_list'));
$this->addHeaderItem($hh->javascript('composer.sort.js', 'remo_composer_list'));
}
$this->addHeaderItem($hh->javascript('composer.overview.js', 'remo_composer_list'));
// add variables used by view
$this->set('customColumns', $this->loadCustomColumns($ctID));
$this->set('ctID', $ctID);
$this->set('ctPublishMethod', $ct->getCollectionTypeComposerPublishMethod());
$this->set('pages', $pages);
$this->set('displaySearchBox', $this->displaySearchBox());
$this->set('composerListTitel', $ct->getCollectionTypeName());
$this->set('pagesPagination', $pl->displayPaging(false, true));
}
示例2: t
<a href="<?php
echo $url;
?>
" target="<?php
echo $target;
?>
"><?php
echo $title;
?>
</a>
</h3>
<div class="ccm-page-list-description">
<?php
echo $description;
?>
</div>
<?php
}
} else {
echo t('No pages found!');
}
echo '</div>';
// Close #ajax-article-list
// Output pagination
if ($paginate_list) {
echo '<div id="ajax-paginator" class="pagination">';
$pl->displayPaging();
echo '</div>';
}
exit;