@@ 8-38 (lines=31) @@ | ||
5 | /** |
|
6 | * Implements a Radio UI component. |
|
7 | */ |
|
8 | class Component_radio |
|
9 | extends AbstractComponent |
|
10 | implements ValueComponentInterface, |
|
11 | DisableableComponentInterface |
|
12 | { |
|
13 | public $component_type = 'radio'; |
|
14 | ||
15 | public function default_model() |
|
16 | { |
|
17 | return array( |
|
18 | 'name' => '', |
|
19 | 'id' => '', |
|
20 | 'disabled' => false, |
|
21 | 'required' => false, |
|
22 | 'readonly' => false, |
|
23 | 'data' => array(), |
|
24 | 'default' => null, |
|
25 | 'show' => null |
|
26 | ); |
|
27 | } |
|
28 | ||
29 | public function required_arguments() |
|
30 | { |
|
31 | return array('name'); |
|
32 | } |
|
33 | ||
34 | public function get_template_path() |
|
35 | { |
|
36 | return __DIR__.'/template.phtml'; |
|
37 | } |
|
38 | } |
@@ 8-38 (lines=31) @@ | ||
5 | /** |
|
6 | * Implements a select UI component. |
|
7 | */ |
|
8 | class Component_select |
|
9 | extends AbstractComponent |
|
10 | implements ValueComponentInterface, |
|
11 | DisableableComponentInterface |
|
12 | { |
|
13 | public $component_type = 'select'; |
|
14 | ||
15 | public function default_model() |
|
16 | { |
|
17 | return array( |
|
18 | 'name' => '', |
|
19 | 'id' => '', |
|
20 | 'disabled' => false, |
|
21 | 'data' => array(), |
|
22 | 'required' => false, |
|
23 | 'readonly' => false, |
|
24 | 'default' => null, |
|
25 | 'show' => null |
|
26 | ); |
|
27 | } |
|
28 | ||
29 | public function required_arguments() |
|
30 | { |
|
31 | return array('name','data'); |
|
32 | } |
|
33 | ||
34 | public function get_template_path() |
|
35 | { |
|
36 | return __DIR__.'/template.phtml'; |
|
37 | } |
|
38 | } |