bakaphp /
phalcon-api
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Gewaer\Api\Controllers; |
||
| 6 | |||
| 7 | use Gewaer\Models\CompaniesCustomFields; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * Class LanguagesController |
||
| 11 | * |
||
| 12 | * @package Gewaer\Api\Controllers |
||
| 13 | * |
||
| 14 | */ |
||
| 15 | class CompaniesCustomFieldsController extends BaseController |
||
| 16 | { |
||
| 17 | /* |
||
| 18 | * fields we accept to create |
||
| 19 | * |
||
| 20 | * @var array |
||
| 21 | */ |
||
| 22 | protected $createFields = ['custom_fields_id', 'value']; |
||
| 23 | |||
| 24 | /* |
||
| 25 | * fields we accept to create |
||
| 26 | * |
||
| 27 | * @var array |
||
| 28 | */ |
||
| 29 | protected $updateFields = ['custom_fields_id', 'value']; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * set objects |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | 2 | public function onConstruct() |
|
| 37 | { |
||
| 38 | 2 | $this->model = new CompaniesCustomFields(); |
|
| 39 | 2 | $this->model->companies_id = $this->userData->default_company; |
|
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 40 | |||
| 41 | 2 | $this->additionalSearchFields = [ |
|
| 42 | 2 | ['companies_id', ':', $this->userData->default_company], |
|
| 43 | ]; |
||
| 44 | 2 | } |
|
| 45 | } |
||
| 46 |