1 | <?php |
||
0 ignored issues
–
show
Coding Style
introduced
by
![]() |
|||
2 | declare(strict_types=1); |
||
3 | |||
4 | namespace Gewaer\Api\Controllers; |
||
5 | |||
6 | use Gewaer\Models\Roles; |
||
7 | |||
8 | /** |
||
9 | * Class RolesController |
||
10 | * |
||
11 | * @package Gewaer\Api\Controllers |
||
12 | * |
||
13 | * @property Users $userData |
||
14 | */ |
||
15 | class RolesController extends BaseController |
||
16 | { |
||
17 | /* |
||
18 | * fields we accept to create |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $createFields = []; |
||
23 | |||
24 | /* |
||
25 | * fields we accept to create |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | protected $updateFields = []; |
||
30 | |||
31 | /** |
||
32 | * set objects |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | public function onConstruct() |
||
37 | { |
||
38 | $this->model = new Roles(); |
||
39 | |||
40 | //get the list of roes for the systema + my company |
||
41 | $this->additionalSearchFields = [ |
||
42 | ['is_deleted', ':', 0], |
||
43 | ['company_id', ':', '(0,' . $this->userData->default_company . ')'], |
||
44 | ]; |
||
45 | } |
||
46 | } |
||
47 |