| @@ 299-310 (lines=12) @@ | ||
| 296 | * |
|
| 297 | * @return PaginatedList |
|
| 298 | */ |
|
| 299 | public function PagedComments() |
|
| 300 | { |
|
| 301 | $list = $this->Comments(); |
|
| 302 | ||
| 303 | // Add pagination |
|
| 304 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 305 | $list->setPaginationGetVar('commentsstart' . $this->owner->ID); |
|
| 306 | $list->setPageLength($this->owner->getCommentsOption('comments_per_page')); |
|
| 307 | ||
| 308 | $this->owner->extend('updatePagedComments', $list); |
|
| 309 | return $list; |
|
| 310 | } |
|
| 311 | ||
| 312 | /** |
|
| 313 | * Determine if comments are enabled for this instance |
|
| @@ 846-857 (lines=12) @@ | ||
| 843 | * |
|
| 844 | * @return PaginatedList |
|
| 845 | */ |
|
| 846 | public function PagedReplies() |
|
| 847 | { |
|
| 848 | $list = $this->Replies(); |
|
| 849 | ||
| 850 | // Add pagination |
|
| 851 | $list = new PaginatedList($list, Controller::curr()->getRequest()); |
|
| 852 | $list->setPaginationGetVar('repliesstart' . $this->ID); |
|
| 853 | $list->setPageLength($this->getOption('comments_per_page')); |
|
| 854 | ||
| 855 | $this->extend('updatePagedReplies', $list); |
|
| 856 | return $list; |
|
| 857 | } |
|
| 858 | ||
| 859 | /** |
|
| 860 | * Generate a reply form for this comment |
|