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
|
@@ 775-785 (lines=11) @@
|
| 772 |
|
* |
| 773 |
|
* @return PaginatedList |
| 774 |
|
*/ |
| 775 |
|
public function PagedReplies() |
| 776 |
|
{ |
| 777 |
|
$list = $this->Replies(); |
| 778 |
|
|
| 779 |
|
// Add pagination |
| 780 |
|
$list = new PaginatedList($list, Controller::curr()->getRequest()); |
| 781 |
|
$list->setPaginationGetVar('repliesstart'.$this->ID); |
| 782 |
|
$list->setPageLength($this->getOption('comments_per_page')); |
| 783 |
|
|
| 784 |
|
$this->extend('updatePagedReplies', $list); |
| 785 |
|
return $list; |
| 786 |
|
} |
| 787 |
|
|
| 788 |
|
/** |