1 | <?php |
||
14 | class Field extends Item |
||
15 | { |
||
16 | /** |
||
17 | * @var Option[] |
||
18 | */ |
||
19 | protected $options = []; |
||
20 | |||
21 | /** |
||
22 | * @var Form[] |
||
23 | */ |
||
24 | protected $types = []; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $defaultType; |
||
30 | |||
31 | /** |
||
32 | * @var bool |
||
33 | */ |
||
34 | protected $required; |
||
35 | |||
36 | /** |
||
37 | * @var null|int |
||
38 | */ |
||
39 | protected $spaceAfter; |
||
40 | |||
41 | /** |
||
42 | * @var Tag[] |
||
43 | */ |
||
44 | protected $tags; |
||
45 | |||
46 | public function setType(string $type): void |
||
50 | |||
51 | public function getOptions(): array |
||
55 | |||
56 | public function addOption(Option $option): void |
||
60 | |||
61 | public function getDefaultType(): string |
||
65 | |||
66 | public function setDefaultType(string $defaultType): void |
||
70 | |||
71 | /** |
||
72 | * @return Form[] |
||
73 | */ |
||
74 | public function getTypes(): array |
||
78 | |||
79 | public function addType(Form $type): void |
||
83 | |||
84 | public function isRequired(): bool |
||
88 | |||
89 | public function setRequired(bool $required): void |
||
93 | |||
94 | public function getSpaceAfter(): ?int |
||
98 | |||
99 | public function setSpaceAfter(int $spaceAfter = null): void |
||
103 | |||
104 | /** |
||
105 | * @return Tag[] |
||
106 | */ |
||
107 | public function getTags(): array |
||
111 | |||
112 | public function addTag(Tag $tag): void |
||
116 | } |
||
117 |