1 | <?php |
||
17 | class OtherChoiceOption |
||
18 | { |
||
19 | /** |
||
20 | * @var string |
||
21 | * |
||
22 | * @ORM\Column(type="guid") |
||
23 | * @ORM\Id |
||
24 | * @ORM\GeneratedValue(strategy="UUID") |
||
25 | */ |
||
26 | private $id; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | * |
||
31 | * @ORM\Column(type="string") |
||
32 | */ |
||
33 | private $category; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | * |
||
38 | * @ORM\Column(type="string") |
||
39 | */ |
||
40 | private $label; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * |
||
45 | * @ORM\Column(type="string", length=2) |
||
46 | */ |
||
47 | private $locale; |
||
48 | |||
49 | /** |
||
50 | * Used to create new choice options in the form type |
||
51 | * |
||
52 | * @var string |
||
53 | */ |
||
54 | private $newChoiceOptionCategory; |
||
55 | |||
56 | public function __construct(string $category, string $label, string $locale) |
||
66 | |||
67 | public function getId(): string |
||
71 | |||
72 | public function getCategory(): string |
||
76 | |||
77 | public function getValue(): string |
||
85 | |||
86 | public function getLabel(): string |
||
90 | |||
91 | public function getLocale(): string |
||
95 | |||
96 | public function __toString(): string |
||
100 | |||
101 | public static function getOtherOption(string $label, string $locale): self |
||
109 | |||
110 | public function getWithNewChoiceOptionCategory(string $newChoiceOptionCategory): self |
||
121 | |||
122 | /** |
||
123 | * This method is used to transform an other choice option into the actual choice option |
||
124 | * |
||
125 | * @param string $label |
||
126 | */ |
||
127 | public function transformToActualChoiceOption(string $label): void |
||
137 | } |
||
138 |