1 | <?php |
||
15 | class TextArea implements StringDataElementInterface { |
||
16 | |||
17 | use StringFilterTrait; |
||
18 | use StringValidationTrait; |
||
19 | |||
20 | |||
21 | /** |
||
22 | * @var string |
||
23 | */ |
||
24 | private $name; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $value; |
||
30 | |||
31 | /** |
||
32 | * @var string|null |
||
33 | */ |
||
34 | private $text = null; |
||
35 | |||
36 | |||
37 | 6 | public function __construct(string $name, string $value = null) { |
|
41 | |||
42 | |||
43 | /** |
||
44 | * @return string |
||
45 | */ |
||
46 | 2 | public function render() { |
|
51 | |||
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | */ |
||
56 | 2 | public function handle(FormData $data) { |
|
60 | |||
61 | |||
62 | 4 | public function setValue(string $value) : self { |
|
66 | |||
67 | |||
68 | 1 | public function setText(string $text) : self { |
|
72 | |||
73 | |||
74 | /** |
||
75 | * @return string|null |
||
76 | */ |
||
77 | public function getText() { |
||
80 | |||
81 | |||
82 | 3 | public function getValue() : string { |
|
85 | |||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | 6 | public function getName() { |
|
93 | |||
94 | } |