bakaphp /
phalcon-api
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Gewaer\Api\Controllers; |
||
| 6 | |||
| 7 | use Gewaer\Models\FileSystem; |
||
| 8 | use Gewaer\Traits\FileManagementTrait; |
||
| 9 | |||
| 10 | /** |
||
| 11 | * Class BaseController |
||
| 12 | * |
||
| 13 | * @package Gewaer\Api\Controllers |
||
| 14 | * |
||
| 15 | */ |
||
| 16 | class FilesystemController extends BaseController |
||
| 17 | { |
||
| 18 | use FileManagementTrait; |
||
|
1 ignored issue
–
show
introduced
by
Loading history...
|
|||
| 19 | |||
| 20 | /* |
||
| 21 | * fields we accept to create |
||
| 22 | * |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $createFields = []; |
||
| 26 | |||
| 27 | /* |
||
| 28 | * fields we accept to create |
||
| 29 | * |
||
| 30 | * @var array |
||
| 31 | */ |
||
| 32 | protected $updateFields = []; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * set objects |
||
| 36 | * |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | 1 | public function onConstruct() |
|
| 40 | { |
||
| 41 | 1 | $this->model = new FileSystem(); |
|
| 42 | 1 | $this->model->users_id = $this->userData->getId(); |
|
|
0 ignored issues
–
show
The property
userData does not exist on Gewaer\Api\Controllers\FilesystemController. Since you implemented __get, consider adding a @property annotation.
Loading history...
|
|||
| 43 | 1 | $this->model->companies_id = $this->userData->currentCompanyId(); |
|
| 44 | |||
| 45 | 1 | $this->additionalSearchFields = [ |
|
| 46 | 1 | ['is_deleted', ':', '0'], |
|
| 47 | 1 | ['companies_id', ':', $this->userData->currentCompanyId()], |
|
| 48 | 1 | ['apps_id', ':', $this->app->getId()] |
|
| 49 | ]; |
||
| 50 | 1 | } |
|
| 51 | } |
||
| 52 |