1 | <?php |
||
28 | class PerformanceEvent extends AbstractPersonalTranslatable implements TranslatableInterface |
||
29 | { |
||
30 | use TimestampableTrait, BlameableEntity, DeletedByTrait; |
||
31 | |||
32 | const VENUE_PHILHARMONIC = "venue-philharmonic"; |
||
33 | const VENUE_KULIC_HOUSE = "venue-kilic-house"; |
||
34 | const VENUE_THEATRE = "venue-theatre"; |
||
35 | const VENUE_SALUT = 'venue-salut'; |
||
36 | const VENUE_PALAC_MOLODI = 'venue-palac_molodi'; |
||
37 | const VENUE_CENTER_OF_KIDS_ARTS = 'venue-center_of_kids_arts'; |
||
38 | const VENUE_CHERKASY_ART_MUSEUM = 'venue-cherkasy-art-museum'; |
||
39 | const VENUE_NATIONS_FRIENDSHIP = 'venue-nations-friendship'; |
||
40 | |||
41 | public static $venues = [ |
||
42 | self::VENUE_PHILHARMONIC => self::VENUE_PHILHARMONIC, |
||
43 | self::VENUE_KULIC_HOUSE => self::VENUE_KULIC_HOUSE, |
||
44 | self::VENUE_THEATRE => self::VENUE_THEATRE, |
||
45 | self::VENUE_SALUT => self::VENUE_SALUT, |
||
46 | self::VENUE_PALAC_MOLODI => self::VENUE_PALAC_MOLODI, |
||
47 | self::VENUE_CENTER_OF_KIDS_ARTS => self::VENUE_CENTER_OF_KIDS_ARTS, |
||
48 | self::VENUE_CHERKASY_ART_MUSEUM => self::VENUE_CHERKASY_ART_MUSEUM, |
||
49 | self::VENUE_NATIONS_FRIENDSHIP => self::VENUE_NATIONS_FRIENDSHIP, |
||
50 | ]; |
||
51 | |||
52 | /** |
||
53 | * @var integer |
||
54 | * |
||
55 | * @ORM\Column(name="id", type="integer") |
||
56 | * @ORM\Id |
||
57 | * @ORM\GeneratedValue(strategy="AUTO") |
||
58 | * @Type("integer") |
||
59 | * @Expose |
||
60 | */ |
||
61 | private $id; |
||
62 | |||
63 | /** |
||
64 | * @var Performance |
||
65 | * |
||
66 | * @ORM\ManyToOne(targetEntity="App\Entity\Performance", inversedBy="performanceEvents") |
||
67 | * @Type("App\Entity\Performance") |
||
68 | * @Expose |
||
69 | */ |
||
70 | private $performance; |
||
71 | |||
72 | /** |
||
73 | * @var /Datetime |
||
74 | * |
||
75 | * @Assert\NotBlank() |
||
76 | * @ORM\Column(type="datetime") |
||
77 | * @Type("DateTime") |
||
78 | * @Expose |
||
79 | */ |
||
80 | private $dateTime; |
||
81 | |||
82 | /** |
||
83 | * Place where performance happens |
||
84 | * @var string |
||
85 | * @ORM\Column(type="string") |
||
86 | * @Type("string") |
||
87 | * @Expose |
||
88 | */ |
||
89 | private $venue; |
||
90 | |||
91 | /** |
||
92 | * @var int |
||
93 | * |
||
94 | * @Type("integer") |
||
95 | * @Expose |
||
96 | * @Accessor(getter="getYear") |
||
97 | */ |
||
98 | private $year; |
||
99 | |||
100 | /** |
||
101 | * @var int |
||
102 | * |
||
103 | * @Expose |
||
104 | * @Accessor(getter="getMonth") |
||
105 | */ |
||
106 | private $month; |
||
107 | |||
108 | /** |
||
109 | * @var int |
||
110 | * |
||
111 | * @Expose |
||
112 | * @Accessor(getter="getDay") |
||
113 | */ |
||
114 | private $day; |
||
115 | |||
116 | /** |
||
117 | * @var string |
||
118 | * |
||
119 | * @Expose |
||
120 | * @Accessor(getter="getTime") |
||
121 | */ |
||
122 | private $time; |
||
123 | |||
124 | /** |
||
125 | * @var string |
||
126 | * @ORM\Column(type="string", nullable=true) |
||
127 | * @Type("string") |
||
128 | * @Expose |
||
129 | */ |
||
130 | private $buyTicketLink; |
||
131 | |||
132 | /** |
||
133 | * @var ArrayCollection |
||
134 | * |
||
135 | * @ORM\OneToMany( |
||
136 | * targetEntity="App\Entity\Translations\PerformanceEventTranslation", |
||
137 | * mappedBy="object", |
||
138 | * cascade={"persist", "remove"} |
||
139 | * ) |
||
140 | */ |
||
141 | protected $translations; |
||
142 | |||
143 | /** |
||
144 | * Unset translations |
||
145 | * |
||
146 | * @return PerformanceEvent |
||
147 | */ |
||
148 | 4 | public function unsetTranslations() |
|
154 | |||
155 | /** |
||
156 | * Get id |
||
157 | * |
||
158 | * @return integer |
||
159 | */ |
||
160 | 10 | public function getId() |
|
164 | |||
165 | /** |
||
166 | * Set dateTime |
||
167 | * |
||
168 | * @param \DateTime $dateTime |
||
169 | * @return PerformanceEvent |
||
170 | */ |
||
171 | public function setDateTime($dateTime) |
||
177 | |||
178 | /** |
||
179 | * Get dateTime |
||
180 | * |
||
181 | * @return \DateTime |
||
182 | */ |
||
183 | 15 | public function getDateTime() |
|
187 | |||
188 | /** |
||
189 | * Set performance |
||
190 | * |
||
191 | * @param \App\Entity\Performance $performance |
||
192 | * @return PerformanceEvent |
||
193 | */ |
||
194 | public function setPerformance(\App\Entity\Performance $performance = null) |
||
200 | |||
201 | /** |
||
202 | * Get performance |
||
203 | * |
||
204 | * @return \App\Entity\Performance |
||
205 | */ |
||
206 | 6 | public function getPerformance() |
|
210 | |||
211 | 1 | public function __toString() |
|
219 | |||
220 | /** |
||
221 | * @return mixed |
||
222 | */ |
||
223 | 4 | public function getYear() |
|
227 | |||
228 | /** |
||
229 | * @param mixed $year |
||
230 | */ |
||
231 | public function setYear($year) |
||
235 | |||
236 | /** |
||
237 | * @return int |
||
238 | */ |
||
239 | 4 | public function getMonth() |
|
243 | |||
244 | /** |
||
245 | * @param int $month |
||
246 | */ |
||
247 | public function setMonth($month) |
||
251 | |||
252 | /** |
||
253 | * @return int |
||
254 | */ |
||
255 | 4 | public function getDay() |
|
259 | |||
260 | /** |
||
261 | * @param int $day |
||
262 | */ |
||
263 | public function setDay($day) |
||
267 | |||
268 | /** |
||
269 | * @return string |
||
270 | */ |
||
271 | 4 | public function getTime() |
|
275 | |||
276 | /** |
||
277 | * @param string $time |
||
278 | */ |
||
279 | public function setTime($time) |
||
283 | |||
284 | /** |
||
285 | * @return string |
||
286 | */ |
||
287 | 7 | public function getVenue() |
|
291 | |||
292 | /** |
||
293 | * @param string $venue |
||
294 | */ |
||
295 | 4 | public function setVenue($venue) |
|
299 | |||
300 | 3 | public function getBuyTicketLink(): ?string |
|
304 | |||
305 | public function setBuyTicketLink(?string $buyTicketLink): self |
||
310 | } |
||
311 |