Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function init() : void |
||
27 | { |
||
28 | // Array |
||
29 | $adapter = new SqlSource(); |
||
30 | $adapter->setSource( |
||
31 | ' |
||
32 | SELECT m.*, u.login |
||
33 | FROM media m |
||
34 | LEFT JOIN users u ON u.id = m.userId |
||
35 | ' |
||
36 | ); |
||
37 | |||
38 | $this->setAdapter($adapter); |
||
39 | $this->setDefaultLimit(25); |
||
40 | $this->setAllowOrders(['id', 'login', 'title', 'type', 'created', 'deleted']); |
||
41 | $this->setAllowFilters(['userId', 'title', 'file']); |
||
42 | } |
||
44 |