| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Dynamic\RecipeBook\Page; |
||||||
| 4 | |||||||
| 5 | use SilverStripe\ORM\PaginatedList; |
||||||
| 6 | |||||||
| 7 | class RecipeLandingController extends \PageController |
||||||
| 8 | { |
||||||
| 9 | public function paginatedList(HTTPRequest $request = null) |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 10 | { |
||||||
| 11 | if ($request === null) { |
||||||
| 12 | $request = $this->request; |
||||||
| 13 | } |
||||||
| 14 | $start = ($request->getVar('start')) ? (int) $request->getVar('start') : 0; |
||||||
| 15 | |||||||
| 16 | $records = PaginatedList::create($this->data()->Children(), $request); |
||||||
| 17 | $records->setPageStart($start); |
||||||
| 18 | |||||||
| 19 | if ($limit = $this->data()->PerPage) { |
||||||
| 20 | $records->setPageLength($limit); |
||||||
| 21 | } |
||||||
| 22 | |||||||
| 23 | // allow $records to be updated via extension |
||||||
| 24 | $this->owner->extend('updatePaginatedList', $records); |
||||||
|
0 ignored issues
–
show
The property
owner does not exist on Dynamic\RecipeBook\Page\RecipeLandingController. Since you implemented __get, consider adding a @property annotation.
Loading history...
The method
extend() does not exist on null.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. Loading history...
|
|||||||
| 25 | |||||||
| 26 | return $records; |
||||||
| 27 | } |
||||||
| 28 | } |
||||||
| 29 |