1 | <?php |
||
33 | class Performance extends AbstractPersonalTranslatable implements TranslatableInterface |
||
34 | { |
||
35 | use TimestampableTrait, LinksTrait, BlameableEntity, DeletedByTrait; |
||
36 | |||
37 | /** |
||
38 | * @var integer |
||
39 | * |
||
40 | * @ORM\Column(name="id", type="integer") |
||
41 | * @ORM\Id |
||
42 | * @ORM\GeneratedValue(strategy="AUTO") |
||
43 | */ |
||
44 | private $id; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | * @Gedmo\Translatable |
||
49 | * @Assert\NotBlank() |
||
50 | * @ORM\Column(type="string", length=255) |
||
51 | * @Type("string") |
||
52 | * @Expose |
||
53 | */ |
||
54 | private $title; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | * @Gedmo\Translatable |
||
59 | * @ORM\Column(type="text", length=255, nullable=true) |
||
60 | * @Type("string") |
||
61 | * @Expose |
||
62 | */ |
||
63 | private $type; |
||
64 | |||
65 | /** |
||
66 | * @var string |
||
67 | * @Gedmo\Translatable |
||
68 | * @Assert\NotBlank() |
||
69 | * @ORM\Column(type="text", nullable=true) |
||
70 | * @Type("string") |
||
71 | * @Expose |
||
72 | */ |
||
73 | private $description; |
||
74 | |||
75 | /** |
||
76 | * @var /Datetime |
||
77 | * |
||
78 | * @Assert\NotBlank() |
||
79 | * @ORM\Column(type="datetime") |
||
80 | * @Type("DateTime") |
||
81 | * @Expose |
||
82 | */ |
||
83 | private $premiere; |
||
84 | |||
85 | /** |
||
86 | * @var |
||
87 | * |
||
88 | * @ORM\OneToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}) |
||
89 | * @ORM\JoinColumn(name="mainPicture_id", referencedColumnName="id", nullable=true) |
||
90 | */ |
||
91 | private $mainPicture; |
||
92 | |||
93 | /** |
||
94 | * @var |
||
95 | * |
||
96 | * @ORM\OneToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}) |
||
97 | * @ORM\JoinColumn(name="sliderImage_id", referencedColumnName="id", nullable=true) |
||
98 | */ |
||
99 | private $sliderImage; |
||
100 | |||
101 | /** |
||
102 | * @var array |
||
103 | * @Expose |
||
104 | * @Type("array") |
||
105 | * @SerializedName("mainPicture") |
||
106 | * @Accessor(getter="getMainPicture") |
||
107 | */ |
||
108 | public $mainPictureThumbnails; |
||
109 | |||
110 | /** |
||
111 | * @var array |
||
112 | * @Expose |
||
113 | * @Type("array") |
||
114 | * @SerializedName("sliderImage") |
||
115 | * @Accessor(getter="getSliderImage") |
||
116 | */ |
||
117 | public $sliderImageThumbnails; |
||
118 | |||
119 | /** |
||
120 | * @var ArrayCollection|PerformanceEvent[] |
||
121 | * |
||
122 | * @ORM\OneToMany( |
||
123 | * targetEntity="AppBundle\Entity\PerformanceEvent", |
||
124 | * mappedBy="performance", |
||
125 | * cascade={"persist"}, |
||
126 | * orphanRemoval=true |
||
127 | * ) |
||
128 | */ |
||
129 | private $performanceEvents; |
||
130 | |||
131 | /** |
||
132 | * @var ArrayCollection|Role[] |
||
133 | * |
||
134 | * @ORM\OneToMany( |
||
135 | * targetEntity="AppBundle\Entity\Role", |
||
136 | * mappedBy="performance", |
||
137 | * cascade={"persist", "remove"}, |
||
138 | * orphanRemoval=true |
||
139 | * ) |
||
140 | */ |
||
141 | private $roles; |
||
142 | |||
143 | /** |
||
144 | * @var ArrayCollection|GalleryHasMedia[] |
||
145 | * |
||
146 | * @ORM\ManyToMany(targetEntity="Application\Sonata\MediaBundle\Entity\GalleryHasMedia", cascade={"persist"}) |
||
147 | * @ORM\JoinTable(name="performance_galleryHasMedia", |
||
148 | * joinColumns={@ORM\JoinColumn(name="performance_id",referencedColumnName="id")}, |
||
149 | * inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")} |
||
150 | * ) |
||
151 | */ |
||
152 | private $galleryHasMedia; |
||
153 | |||
154 | /** |
||
155 | * @var array |
||
156 | * @Expose |
||
157 | * @Type("array") |
||
158 | * @SerializedName("gallery") |
||
159 | * @Accessor(getter="getGalleryHasMedia") |
||
160 | */ |
||
161 | public $galleryHasMediaThumbnails; |
||
162 | |||
163 | /** |
||
164 | * @Gedmo\Slug(fields={"title"}) |
||
165 | * @ORM\Column(name="slug", type="string", length=255) |
||
166 | * @Type("string") |
||
167 | * @Expose |
||
168 | */ |
||
169 | private $slug; |
||
170 | |||
171 | /** |
||
172 | * @var ArrayCollection|PerformanceTranslation[] |
||
173 | * |
||
174 | * @ORM\OneToMany( |
||
175 | * targetEntity="AppBundle\Entity\Translations\PerformanceTranslation", |
||
176 | * mappedBy="object", |
||
177 | * cascade={"persist", "remove"} |
||
178 | * ) |
||
179 | */ |
||
180 | protected $translations; |
||
181 | |||
182 | /** |
||
183 | * @var \AppBundle\Entity\History |
||
184 | * |
||
185 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\History", inversedBy="performances") |
||
186 | 1 | */ |
|
187 | protected $festival; |
||
188 | 1 | ||
189 | 1 | /** |
|
190 | 1 | * Constructor |
|
191 | 1 | */ |
|
192 | 1 | public function __construct() |
|
199 | 8 | ||
200 | /** |
||
201 | 8 | * Unset translations |
|
202 | * |
||
203 | 8 | * @return Performance |
|
204 | */ |
||
205 | public function unsetTranslations() |
||
211 | 2 | ||
212 | /** |
||
213 | 2 | * Get id |
|
214 | * |
||
215 | * @return integer |
||
216 | */ |
||
217 | public function getId() |
||
221 | 3 | ||
222 | /** |
||
223 | 3 | * Get type |
|
224 | * |
||
225 | * @return string |
||
226 | */ |
||
227 | public function getType() |
||
231 | |||
232 | /** |
||
233 | * Set type |
||
234 | * |
||
235 | * @param string $type |
||
236 | * @return Performance |
||
237 | */ |
||
238 | public function setType($type) |
||
244 | 1 | ||
245 | /** |
||
246 | 1 | * Get description |
|
247 | * |
||
248 | * @return string |
||
249 | */ |
||
250 | public function getDescription() |
||
254 | |||
255 | /** |
||
256 | * Set description |
||
257 | * |
||
258 | * @param string $description |
||
259 | * @return Performance |
||
260 | */ |
||
261 | public function setDescription($description) |
||
267 | 3 | ||
268 | /** |
||
269 | 3 | * Get premiere |
|
270 | * |
||
271 | * @return \DateTime |
||
272 | */ |
||
273 | public function getPremiere() |
||
277 | |||
278 | /** |
||
279 | * Set premiere |
||
280 | * |
||
281 | * @param \DateTime $premiere |
||
282 | * @return Performance |
||
283 | */ |
||
284 | public function setPremiere($premiere) |
||
290 | 13 | ||
291 | /** |
||
292 | 13 | * Get mainPicture |
|
293 | * |
||
294 | * @return \Application\Sonata\MediaBundle\Entity\Media |
||
295 | */ |
||
296 | public function getMainPicture() |
||
300 | |||
301 | /** |
||
302 | * Set mainPicture |
||
303 | * |
||
304 | * @param \Application\Sonata\MediaBundle\Entity\Media $mainPicture |
||
305 | * @return Performance |
||
306 | */ |
||
307 | public function setMainPicture(\Application\Sonata\MediaBundle\Entity\Media $mainPicture = null) |
||
313 | 11 | ||
314 | /** |
||
315 | 11 | * Get sliderImage |
|
316 | * |
||
317 | * @return \Application\Sonata\MediaBundle\Entity\Media |
||
318 | */ |
||
319 | public function getSliderImage() |
||
323 | |||
324 | /** |
||
325 | * Set sliderImage |
||
326 | * |
||
327 | * @param \Application\Sonata\MediaBundle\Entity\Media $sliderImage |
||
328 | * @return Performance |
||
329 | */ |
||
330 | public function setSliderImage(\Application\Sonata\MediaBundle\Entity\Media $sliderImage = null) |
||
336 | 5 | ||
337 | /** |
||
338 | 5 | * Get slug |
|
339 | * |
||
340 | * @return string |
||
341 | */ |
||
342 | public function getSlug() |
||
346 | |||
347 | /** |
||
348 | * Set slug |
||
349 | * |
||
350 | * @param string $slug |
||
351 | * @return Performance |
||
352 | */ |
||
353 | public function setSlug($slug) |
||
359 | |||
360 | /** |
||
361 | * Add performanceEvent |
||
362 | * |
||
363 | * @param \AppBundle\Entity\PerformanceEvent $performanceEvent |
||
364 | * @return Performance |
||
365 | */ |
||
366 | public function addPerformanceEvent(\AppBundle\Entity\PerformanceEvent $performanceEvent) |
||
372 | |||
373 | /** |
||
374 | * Remove performanceEvent |
||
375 | * |
||
376 | * @param \AppBundle\Entity\PerformanceEvent $performanceEvent |
||
377 | */ |
||
378 | public function removePerformanceEvent(\AppBundle\Entity\PerformanceEvent $performanceEvent) |
||
382 | 2 | ||
383 | /** |
||
384 | 2 | * Get performanceEvents |
|
385 | * |
||
386 | * @return \Doctrine\Common\Collections\Collection |
||
387 | */ |
||
388 | public function getPerformanceEvents() |
||
392 | |||
393 | /** |
||
394 | * Add role |
||
395 | * |
||
396 | * @param \AppBundle\Entity\Role $role |
||
397 | * @return Performance |
||
398 | */ |
||
399 | public function addRole(\AppBundle\Entity\Role $role) |
||
406 | |||
407 | /** |
||
408 | * Remove role |
||
409 | * |
||
410 | * @param \AppBundle\Entity\Role $role |
||
411 | */ |
||
412 | public function removeRole(\AppBundle\Entity\Role $role) |
||
416 | 3 | ||
417 | /** |
||
418 | 3 | * Get roles |
|
419 | * |
||
420 | * @return \Doctrine\Common\Collections\Collection |
||
421 | 7 | */ |
|
422 | public function getRoles() |
||
426 | |||
427 | public function __toString() |
||
431 | 8 | ||
432 | /** |
||
433 | 8 | * Get title |
|
434 | * |
||
435 | * @return string |
||
436 | */ |
||
437 | public function getTitle() |
||
441 | |||
442 | /** |
||
443 | * Set title |
||
444 | * |
||
445 | * @param string $title |
||
446 | * @return Performance |
||
447 | */ |
||
448 | public function setTitle($title) |
||
454 | |||
455 | /** |
||
456 | * Add galleryHasMedia |
||
457 | * |
||
458 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
459 | * @return Performance |
||
460 | */ |
||
461 | public function addGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
467 | |||
468 | /** |
||
469 | * Remove galleryHasMedia |
||
470 | * |
||
471 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
472 | */ |
||
473 | public function removeGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
477 | 10 | ||
478 | /** |
||
479 | 10 | * Get galleryHasMedia |
|
480 | * |
||
481 | * @return \Doctrine\Common\Collections\Collection |
||
482 | */ |
||
483 | public function getGalleryHasMedia() |
||
487 | 3 | ||
488 | /** |
||
489 | * @return History |
||
490 | */ |
||
491 | public function getFestival() |
||
495 | |||
496 | /** |
||
497 | * @param History $festival |
||
498 | * @return $this |
||
499 | */ |
||
500 | public function setFestival($festival) |
||
506 | } |
||
507 |