1 | <?php |
||
19 | class ActiveFormBuilder extends ActiveForm |
||
20 | { |
||
21 | const INPUT_HIDDEN = 'hiddenInput'; |
||
22 | const INPUT_TEXT = 'textInput'; |
||
23 | const INPUT_TEXTAREA = 'textarea'; |
||
24 | const INPUT_PASSWORD = 'passwordInput'; |
||
25 | const INPUT_DROPDOWN_LIST = 'dropdownList'; |
||
26 | const INPUT_LIST_BOX = 'listBox'; |
||
27 | const INPUT_CHECKBOX = 'checkbox'; |
||
28 | const INPUT_RADIO = 'radio'; |
||
29 | const INPUT_CHECKBOX_LIST = 'checkboxList'; |
||
30 | const INPUT_RADIO_LIST = 'radioList'; |
||
31 | const INPUT_FILE = 'fileInput'; |
||
32 | const INPUT_HTML5 = 'input'; |
||
33 | const INPUT_WIDGET = 'widget'; |
||
34 | const INPUT_RAW = 'raw'; |
||
35 | |||
36 | /** |
||
37 | * @param Model $model |
||
38 | * @param array $config |
||
39 | * |
||
40 | * @return null|string |
||
41 | */ |
||
42 | public function renderForm(Model $model, array $config) |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @param string $attribute |
||
55 | * @param array $settings |
||
56 | * @param Model $model |
||
57 | * |
||
58 | * @return ActiveField |
||
59 | * @throws InvalidConfigException |
||
60 | */ |
||
61 | public function renderField(Model $model, $attribute, array $settings = []) |
||
78 | |||
79 | /** |
||
80 | * @param ActiveField $field |
||
81 | * @param $type |
||
82 | * @param array $settings |
||
83 | * @throws InvalidConfigException |
||
84 | */ |
||
85 | protected function prepareField($field, $type, array $settings) |
||
129 | |||
130 | /** |
||
131 | * @param array $settings |
||
132 | * @return mixed |
||
133 | * @throws InvalidConfigException |
||
134 | */ |
||
135 | protected function getWidgetClass(array $settings) |
||
145 | |||
146 | /** |
||
147 | * @param array $settings |
||
148 | * @return mixed|string |
||
149 | */ |
||
150 | protected function getValue(array $settings) |
||
160 | } |
||
161 |