| @@ 302-313 (lines=12) @@ | ||
| 299 | * |
|
| 300 | * @return PaginatedList |
|
| 301 | */ |
|
| 302 | public function PagedComments() |
|
| 303 | { |
|
| 304 | $list = $this->Comments(); |
|
| 305 | ||
| 306 | // Add pagination |
|
| 307 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 308 | $list->setPaginationGetVar('commentsstart' . $this->owner->ID); |
|
| 309 | $list->setPageLength($this->owner->getCommentsOption('comments_per_page')); |
|
| 310 | ||
| 311 | $this->owner->extend('updatePagedComments', $list); |
|
| 312 | return $list; |
|
| 313 | } |
|
| 314 | ||
| 315 | /** |
|
| 316 | * Determine if comments are enabled for this instance |
|
| @@ 829-840 (lines=12) @@ | ||
| 826 | * |
|
| 827 | * @return PaginatedList |
|
| 828 | */ |
|
| 829 | public function PagedReplies() |
|
| 830 | { |
|
| 831 | $list = $this->Replies(); |
|
| 832 | ||
| 833 | // Add pagination |
|
| 834 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 835 | $list->setPaginationGetVar('repliesstart' . $this->ID); |
|
| 836 | $list->setPageLength($this->getOption('comments_per_page')); |
|
| 837 | ||
| 838 | $this->extend('updatePagedReplies', $list); |
|
| 839 | return $list; |
|
| 840 | } |
|
| 841 | ||
| 842 | /** |
|
| 843 | * Generate a reply form for this comment |
|