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