| 1 | <?php |
||
| 14 | class Input extends \Model |
||
| 15 | { |
||
| 16 | public static $objectName = 'Поле формы'; |
||
| 17 | public static $labels = [ |
||
| 18 | 'label' => 'Название', |
||
| 19 | 'type' => 'Тип', |
||
| 20 | 'required' => 'Обязательное', |
||
| 21 | 'params' => 'Параметры' |
||
| 22 | ]; |
||
| 23 | public static $cols = [ |
||
| 24 | 'label' => ['type' => 'text'], |
||
| 25 | 'type' => ['type' => 'text'], |
||
| 26 | 'required' => ['type' => 'bool'], |
||
| 27 | 'form_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'form'], |
||
| 28 | 'user_id' => [ 'type' => 'select', 'source' => 'relation', 'relation' => 'user'], |
||
| 29 | 'input_params' => ['type' => 'textarea'], |
||
| 30 | 'weight' => ['type' => 'number'] |
||
| 31 | ]; |
||
| 32 | public static $dataManagers = [ |
||
| 33 | 'manager' => [ |
||
| 34 | 'cols' => [ |
||
| 35 | 'label', |
||
| 36 | 'type', |
||
| 37 | 'required', |
||
| 38 | ], |
||
| 39 | 'sortMode' => true |
||
| 40 | ] |
||
| 41 | ]; |
||
| 42 | public static $forms = [ |
||
| 43 | 'manager' => [ |
||
| 44 | 'map' => [ |
||
| 45 | ['label', 'form_id'], |
||
| 46 | ['type', 'required'], |
||
| 47 | ] |
||
| 48 | ] |
||
| 49 | ]; |
||
| 50 | |||
| 51 | public static function relations() |
||
| 64 | |||
| 65 | } |
||
| 66 |