本文整理匯總了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