本文整理汇总了PHP中PaginatedList::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP PaginatedList::__construct方法的具体用法?PHP PaginatedList::__construct怎么用?PHP PaginatedList::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaginatedList
的用法示例。
在下文中一共展示了PaginatedList::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct(\SS_List $list, $request = array())
{
parent::__construct($list, $request);
if (!$this->request->isAjax()) {
$this->initRequirements();
}
}
开发者ID:andrelohmann,项目名称:silverstripe-bootstrap_orderable_frontend,代码行数:7,代码来源:OrderablePaginatedList.php
示例2: __construct
/**
* Constructs a new paginated list instance around a list.
*
* @param SS_List $list The list to paginate. The getRange method will
* be used to get the subset of objects to show.
* @param int the default length of a page if none is set
* @param array|ArrayAccess Either a map of request parameters or
* request object that the pagination offset is read from.
*/
public function __construct(SS_List $list, $request = array(), $defaultLength = 0)
{
if (!is_array($request) && !$request instanceof ArrayAccess) {
throw new Exception('The request must be readable as an array.');
}
$this->request = $request;
if (!$defaultLength) {
$defaultLength = $this->getPageLength();
}
if ($length = $this->request[$this->getLengthGetVar()]) {
if ($length == $this->unlimitedLengthText) {
$length = $this->unlimitedLength;
}
} else {
$length = $defaultLength;
}
$this->setPageLength($length);
parent::__construct($list, $request);
}