| Conditions | 1 |
| Paths | 1 |
| Total Lines | 32 |
| Code Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function init() : void |
||
| 29 | { |
||
| 30 | $select = Table::select(); |
||
| 31 | $select |
||
| 32 | ->addSelect('users.login AS login') |
||
| 33 | ->leftJoin('push', 'users', 'users', 'push.userId = users.id'); |
||
| 34 | |||
| 35 | // Current table as source of grid |
||
| 36 | $adapter = new SelectSource(); |
||
| 37 | $adapter->setSource($select); |
||
| 38 | |||
| 39 | $this->setAdapter($adapter); |
||
| 40 | $this->setDefaultLimit(25); |
||
| 41 | $this->setAllowFilters([ |
||
| 42 | 'id', |
||
| 43 | 'userId', |
||
| 44 | 'authToken', |
||
| 45 | 'contentEncoding', |
||
| 46 | 'endpoint', |
||
| 47 | 'publicKey', |
||
| 48 | 'created', |
||
| 49 | 'updated', |
||
| 50 | ]); |
||
| 51 | $this->setAllowOrders([ |
||
| 52 | 'id', |
||
| 53 | 'userId', |
||
| 54 | 'authToken', |
||
| 55 | 'contentEncoding', |
||
| 56 | 'endpoint', |
||
| 57 | 'publicKey', |
||
| 58 | 'created', |
||
| 59 | 'updated', |
||
| 60 | ]); |
||
| 63 |