code/extensions/CommentsExtension.php 1 location
|
@@ 269-279 (lines=11) @@
|
| 266 |
|
* |
| 267 |
|
* @return PaginatedList |
| 268 |
|
*/ |
| 269 |
|
public function PagedComments() |
| 270 |
|
{ |
| 271 |
|
$list = $this->Comments(); |
| 272 |
|
|
| 273 |
|
// Add pagination |
| 274 |
|
$list = new PaginatedList($list, Controller::curr()->getRequest()); |
| 275 |
|
$list->setPaginationGetVar('commentsstart' . $this->owner->ID); |
| 276 |
|
$list->setPageLength($this->owner->getCommentsOption('comments_per_page')); |
| 277 |
|
|
| 278 |
|
$this->owner->extend('updatePagedComments', $list); |
| 279 |
|
return $list; |
| 280 |
|
} |
| 281 |
|
|
| 282 |
|
/** |
code/model/Comment.php 1 location
|
@@ 767-777 (lines=11) @@
|
| 764 |
|
* |
| 765 |
|
* @return PaginatedList |
| 766 |
|
*/ |
| 767 |
|
public function PagedReplies() |
| 768 |
|
{ |
| 769 |
|
$list = $this->Replies(); |
| 770 |
|
|
| 771 |
|
// Add pagination |
| 772 |
|
$list = new PaginatedList($list, Controller::curr()->getRequest()); |
| 773 |
|
$list->setPaginationGetVar('repliesstart'.$this->ID); |
| 774 |
|
$list->setPageLength($this->getOption('comments_per_page')); |
| 775 |
|
|
| 776 |
|
$this->extend('updatePagedReplies', $list); |
| 777 |
|
return $list; |
| 778 |
|
} |
| 779 |
|
|
| 780 |
|
/** |