2017-06-01 09:44:36 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Krutush\Form;
|
|
|
|
|
|
|
|
class TextArea extends Element{
|
2018-04-25 17:15:57 +00:00
|
|
|
public function valid($data)/*: bool|string*/{
|
2017-06-01 09:44:36 +00:00
|
|
|
return parent::valid($data);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function html(string $more = '') : string{
|
|
|
|
return '<textarea name="'.$this->data['name'].'" '.
|
|
|
|
(isset($this->data['value']) ? 'value="'.$this->data['value'].'" ' : '').
|
|
|
|
(isset($this->data['required']) && $this->data['required'] == true ? 'required ' : '').
|
|
|
|
$more.'></textarea>';
|
|
|
|
}
|
|
|
|
}
|