+Text Area field

This commit is contained in:
Andrey Pokidov
2020-03-30 15:58:57 +07:00
parent 91db894d39
commit 42cdee7ab0
2 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<?php
namespace Artmark\Forms\Fields;
use Artmark\Forms\AbstractVisibleField;
/**
* Description of TextField
*
* @author Andrey Pokidov <pokidov@e-traffic.ru>
*/
class TextAreaField extends AbstractVisibleField
{
private $value = '';
public function __construct($form, $name, $value = '')
{
parent::__construct($form, 'textarea', $name);
$this->setValue($value);
}
/**
* Возвращает ранее заданное значение поля
* @return string
*/
public function value()
{
return $this->value;
}
/**
* Устанавливает новое значение для поля
* @param mixed $newValue новое значение
* @return $this
*/
public function setValue($newValue)
{
$this->value = strval($newValue);
}
}