本文整理汇总了PHP中PaginatedList::exists方法的典型用法代码示例。如果您正苦于以下问题:PHP PaginatedList::exists方法的具体用法?PHP PaginatedList::exists怎么用?PHP PaginatedList::exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaginatedList
的用法示例。
在下文中一共展示了PaginatedList::exists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: history
/**
* Display all historic orders for the current user
*
*/
public function history()
{
$member = Member::currentUser();
$orders = new PaginatedList($member->getHistoricOrders(), $this->owner->request);
if (!$orders->exists()) {
$message = '<p class="message message-info">';
$message .= _t("CommerceAccount.NoOrders", "There are currently no orders");
$message .= '</p>';
$content = new HTMLText();
$content->setValue($message);
} else {
$content = $this->owner->renderWith("Commerce_Account_OrdersList", array("Orders" => $orders));
}
$this->owner->customise(array("ClassName" => "AccountPage", "Title" => _t('CommerceAccount.OrderHistory', 'Order History'), "Content" => $content, "Orders" => $orders));
return $this->owner->renderWith(array("Users_Account", "Users", "Page"));
}
开发者ID:helpfulrobot,项目名称:i-lateral-silverstripe-commerce,代码行数:20,代码来源:Ext_Commerce_UsersController.php