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 | * Used to create new choice options in the form type |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | private $newChoiceOptionCategory; |
||
48 | |||
49 | public function __construct(string $category, string $label) |
||
58 | |||
59 | public function getId(): string |
||
63 | |||
64 | public function getCategory(): string |
||
68 | |||
69 | public function getValue(): string |
||
77 | |||
78 | public function getLabel(): string |
||
82 | |||
83 | public function __toString(): string |
||
87 | |||
88 | public static function getOtherOption(string $label): self |
||
96 | |||
97 | public function getWithNewChoiceOptionCategory(string $newChoiceOptionCategory): self |
||
108 | |||
109 | /** |
||
110 | * This method is used to transform an other choice option into the actual choice option |
||
111 | * |
||
112 | * @param string $label |
||
113 | */ |
||
114 | public function transformToActualChoiceOption(string $label): void |
||
124 | } |
||
125 |