| @@ 301-312 (lines=12) @@ | ||
| 298 | * |
|
| 299 | * @return PaginatedList |
|
| 300 | */ |
|
| 301 | public function PagedComments() |
|
| 302 | { |
|
| 303 | $list = $this->Comments(); |
|
| 304 | ||
| 305 | // Add pagination |
|
| 306 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 307 | $list->setPaginationGetVar('commentsstart' . $this->owner->ID); |
|
| 308 | $list->setPageLength($this->owner->getCommentsOption('comments_per_page')); |
|
| 309 | ||
| 310 | $this->owner->extend('updatePagedComments', $list); |
|
| 311 | return $list; |
|
| 312 | } |
|
| 313 | ||
| 314 | /** |
|
| 315 | * Determine if comments are enabled for this instance |
|
| @@ 855-866 (lines=12) @@ | ||
| 852 | * |
|
| 853 | * @return PaginatedList |
|
| 854 | */ |
|
| 855 | public function PagedReplies() |
|
| 856 | { |
|
| 857 | $list = $this->Replies(); |
|
| 858 | ||
| 859 | // Add pagination |
|
| 860 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 861 | $list->setPaginationGetVar('repliesstart' . $this->ID); |
|
| 862 | $list->setPageLength($this->getOption('comments_per_page')); |
|
| 863 | ||
| 864 | $this->extend('updatePagedReplies', $list); |
|
| 865 | return $list; |
|
| 866 | } |
|
| 867 | ||
| 868 | /** |
|
| 869 | * Generate a reply form for this comment |
|