| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function init() |
||
| 32 | { |
||
| 33 | // Setup source |
||
| 34 | $adapter = new SqlSource(); |
||
| 35 | $adapter->setSource('SELECT * FROM pages'); |
||
| 36 | |||
| 37 | $this->setAdapter($adapter); |
||
| 38 | $this->setDefaultLimit(25); |
||
| 39 | $this->setAllowOrders(['title', 'id', 'created', 'updated']); |
||
| 40 | $this->setAllowFilters(['title', 'alias', 'description', 'content', 'id']); |
||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |