1 | <?php |
||
28 | abstract class FormFieldInput extends FormFieldDefault |
||
29 | { |
||
30 | |||
31 | /** |
||
32 | * @return string Type value for input element |
||
33 | */ |
||
34 | abstract function getInputType(); |
||
35 | |||
36 | /** |
||
37 | * |
||
38 | * @param string $name |
||
39 | * @param string $title |
||
40 | */ |
||
41 | public function __construct($name, $title, $idSuffix = null) |
||
46 | |||
47 | /** |
||
48 | * |
||
49 | * @return \hemio\form\Abstract_\TemplateFormField |
||
50 | */ |
||
51 | public function fill() |
||
52 | { |
||
53 | $template = $this->getFieldTemplateClone(strtoupper($this->getInputType())); |
||
54 | |||
55 | $this['_TEMPLATE'] = $template; |
||
56 | $template->init($this, $this->control); |
||
57 | $this->control->setAttribute('value', $this->getValueToUse()); |
||
58 | |||
59 | $this->filled = true; |
||
60 | |||
61 | return $template; |
||
62 | } |
||
63 | |||
64 | public function describe() |
||
68 | } |
||
69 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.