| @@ 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 |
|
| @@ 854-865 (lines=12) @@ | ||
| 851 | * |
|
| 852 | * @return PaginatedList |
|
| 853 | */ |
|
| 854 | public function PagedReplies() |
|
| 855 | { |
|
| 856 | $list = $this->Replies(); |
|
| 857 | ||
| 858 | // Add pagination |
|
| 859 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 860 | $list->setPaginationGetVar('repliesstart' . $this->ID); |
|
| 861 | $list->setPageLength($this->getOption('comments_per_page')); |
|
| 862 | ||
| 863 | $this->extend('updatePagedReplies', $list); |
|
| 864 | return $list; |
|
| 865 | } |
|
| 866 | ||
| 867 | /** |
|
| 868 | * Generate a reply form for this comment |
|