| @@ 91-97 (lines=7) @@ | ||
| 88 | }, $index,$attributes); |
|
| 89 | } |
|
| 90 | ||
| 91 | public function fieldAsInput($index,$attributes=NULL){ |
|
| 92 | return $this->_fieldAs(function($id,$name,$value,$caption){ |
|
| 93 | $input= new HtmlFormInput($id,$caption,"text",$value); |
|
| 94 | $input->setName($name); |
|
| 95 | return $input; |
|
| 96 | }, $index,$attributes); |
|
| 97 | } |
|
| 98 | ||
| 99 | public function fieldAsCheckbox($index,$attributes=NULL){ |
|
| 100 | return $this->_fieldAs(function($id,$name,$value,$caption){ |
|
| @@ 103-110 (lines=8) @@ | ||
| 100 | }, $index,$attributes,"radio"); |
|
| 101 | } |
|
| 102 | ||
| 103 | public function fieldAsInput($index,$attributes=NULL){ |
|
| 104 | return $this->_fieldAs(function($id,$name,$value){ |
|
| 105 | $input= new HtmlInput($id,"text",$value); |
|
| 106 | //TODO check getField |
|
| 107 | $input->setName($name); |
|
| 108 | return $input; |
|
| 109 | }, $index,$attributes,"input"); |
|
| 110 | } |
|
| 111 | ||
| 112 | public function fieldAsHidden($index,$attributes=NULL){ |
|
| 113 | if(\is_array($attributes)===false){ |
|