1 | <?php |
||
32 | class Performance extends AbstractPersonalTranslatable implements TranslatableInterface |
||
33 | { |
||
34 | use TimestampableTrait, LinksTrait, BlameableEntity, DeletedByTrait; |
||
35 | |||
36 | /** |
||
37 | * @var integer |
||
38 | * |
||
39 | * @ORM\Column(name="id", type="integer") |
||
40 | * @ORM\Id |
||
41 | * @ORM\GeneratedValue(strategy="AUTO") |
||
42 | */ |
||
43 | private $id; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | * @Gedmo\Translatable |
||
48 | * @Assert\NotBlank() |
||
49 | * @ORM\Column(type="string", length=255) |
||
50 | * @Type("string") |
||
51 | * @Expose |
||
52 | */ |
||
53 | private $title; |
||
54 | |||
55 | /** |
||
56 | * @var string |
||
57 | * @Gedmo\Translatable |
||
58 | * @ORM\Column(type="text", length=255, nullable=true) |
||
59 | * @Type("string") |
||
60 | * @Expose |
||
61 | */ |
||
62 | private $type; |
||
63 | |||
64 | /** |
||
65 | * @var string |
||
66 | * @Gedmo\Translatable |
||
67 | * @Assert\NotBlank() |
||
68 | * @ORM\Column(type="text", nullable=true) |
||
69 | * @Type("string") |
||
70 | * @Expose |
||
71 | */ |
||
72 | private $description; |
||
73 | |||
74 | /** |
||
75 | * @var /Datetime |
||
76 | * |
||
77 | * @Assert\NotBlank() |
||
78 | * @ORM\Column(type="datetime") |
||
79 | * @Type("DateTime") |
||
80 | * @Expose |
||
81 | */ |
||
82 | private $premiere; |
||
83 | |||
84 | /** |
||
85 | * @var |
||
86 | * |
||
87 | * @ORM\OneToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}) |
||
88 | * @ORM\JoinColumn(name="mainPicture_id", referencedColumnName="id", nullable=true) |
||
89 | */ |
||
90 | private $mainPicture; |
||
91 | |||
92 | /** |
||
93 | * @var |
||
94 | * |
||
95 | * @ORM\OneToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}) |
||
96 | * @ORM\JoinColumn(name="sliderImage_id", referencedColumnName="id", nullable=true) |
||
97 | */ |
||
98 | private $sliderImage; |
||
99 | |||
100 | /** |
||
101 | * @var array |
||
102 | * @Expose |
||
103 | * @Type("array") |
||
104 | * @SerializedName("mainPicture") |
||
105 | */ |
||
106 | public $mainPictureThumbnails; |
||
107 | |||
108 | /** |
||
109 | * @var array |
||
110 | * @Expose |
||
111 | * @Type("array") |
||
112 | * @SerializedName("sliderImage") |
||
113 | */ |
||
114 | public $sliderImageThumbnails; |
||
115 | |||
116 | /** |
||
117 | * @var ArrayCollection|PerformanceEvent[] |
||
118 | * |
||
119 | * @ORM\OneToMany( |
||
120 | * targetEntity="AppBundle\Entity\PerformanceEvent", |
||
121 | * mappedBy="performance", |
||
122 | * cascade={"persist"}, |
||
123 | * orphanRemoval=true |
||
124 | * ) |
||
125 | */ |
||
126 | private $performanceEvents; |
||
127 | |||
128 | /** |
||
129 | * @var ArrayCollection|Role[] |
||
130 | * |
||
131 | * @ORM\OneToMany( |
||
132 | * targetEntity="AppBundle\Entity\Role", |
||
133 | * mappedBy="performance", |
||
134 | * cascade={"persist", "remove"}, |
||
135 | * orphanRemoval=true |
||
136 | * ) |
||
137 | */ |
||
138 | private $roles; |
||
139 | |||
140 | /** |
||
141 | * @var ArrayCollection|GalleryHasMedia[] |
||
142 | * |
||
143 | * @ORM\ManyToMany(targetEntity="Application\Sonata\MediaBundle\Entity\GalleryHasMedia", cascade={"persist"}) |
||
144 | * @ORM\JoinTable(name="performance_galleryHasMedia", |
||
145 | * joinColumns={@ORM\JoinColumn(name="performance_id",referencedColumnName="id")}, |
||
146 | * inverseJoinColumns={@ORM\JoinColumn(name="galleryHasMedia_id",referencedColumnName="id")} |
||
147 | * ) |
||
148 | */ |
||
149 | private $galleryHasMedia; |
||
150 | |||
151 | /** |
||
152 | * @var array |
||
153 | * @Expose |
||
154 | * @Type("array") |
||
155 | * @SerializedName("gallery") |
||
156 | */ |
||
157 | public $galleryHasMediaThumbnails; |
||
158 | |||
159 | /** |
||
160 | * @Gedmo\Slug(fields={"title"}) |
||
161 | * @ORM\Column(name="slug", type="string", length=255) |
||
162 | * @Type("string") |
||
163 | * @Expose |
||
164 | */ |
||
165 | private $slug; |
||
166 | |||
167 | /** |
||
168 | * @var ArrayCollection|PerformanceTranslation[] |
||
169 | * |
||
170 | * @ORM\OneToMany( |
||
171 | * targetEntity="AppBundle\Entity\Translations\PerformanceTranslation", |
||
172 | * mappedBy="object", |
||
173 | * cascade={"persist", "remove"} |
||
174 | * ) |
||
175 | */ |
||
176 | protected $translations; |
||
177 | |||
178 | /** |
||
179 | * @var \AppBundle\Entity\History |
||
180 | * |
||
181 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\History", inversedBy="performances") |
||
182 | */ |
||
183 | protected $festival; |
||
184 | |||
185 | /** |
||
186 | * Constructor |
||
187 | */ |
||
188 | public function __construct() |
||
189 | { |
||
190 | parent::__construct(); |
||
191 | $this->performanceEvents = new ArrayCollection(); |
||
192 | $this->roles = new ArrayCollection(); |
||
193 | $this->galleryHasMedia = new ArrayCollection(); |
||
194 | } |
||
195 | |||
196 | /** |
||
197 | * Unset translations |
||
198 | * |
||
199 | 8 | * @return Performance |
|
200 | */ |
||
201 | 8 | public function unsetTranslations() |
|
207 | |||
208 | /** |
||
209 | * Get id |
||
210 | * |
||
211 | 1 | * @return integer |
|
212 | */ |
||
213 | 1 | public function getId() |
|
217 | |||
218 | /** |
||
219 | * Get type |
||
220 | * |
||
221 | * @return string |
||
222 | */ |
||
223 | public function getType() |
||
224 | { |
||
225 | return $this->type; |
||
226 | } |
||
227 | |||
228 | /** |
||
229 | * Set type |
||
230 | * |
||
231 | * @param string $type |
||
232 | * @return Performance |
||
233 | */ |
||
234 | public function setType($type) |
||
240 | |||
241 | /** |
||
242 | * Get description |
||
243 | * |
||
244 | * @return string |
||
245 | */ |
||
246 | public function getDescription() |
||
247 | { |
||
248 | return $this->description; |
||
249 | } |
||
250 | |||
251 | /** |
||
252 | * Set description |
||
253 | * |
||
254 | * @param string $description |
||
255 | * @return Performance |
||
256 | */ |
||
257 | public function setDescription($description) |
||
263 | |||
264 | /** |
||
265 | * Get premiere |
||
266 | * |
||
267 | * @return \DateTime |
||
268 | */ |
||
269 | public function getPremiere() |
||
270 | { |
||
271 | return $this->premiere; |
||
272 | } |
||
273 | |||
274 | /** |
||
275 | * Set premiere |
||
276 | * |
||
277 | * @param \DateTime $premiere |
||
278 | * @return Performance |
||
279 | */ |
||
280 | public function setPremiere($premiere) |
||
286 | |||
287 | /** |
||
288 | * Get mainPicture |
||
289 | * |
||
290 | 7 | * @return \Application\Sonata\MediaBundle\Entity\Media |
|
291 | */ |
||
292 | 7 | public function getMainPicture() |
|
296 | |||
297 | /** |
||
298 | * Set mainPicture |
||
299 | * |
||
300 | * @param \Application\Sonata\MediaBundle\Entity\Media $mainPicture |
||
301 | * @return Performance |
||
302 | */ |
||
303 | public function setMainPicture(\Application\Sonata\MediaBundle\Entity\Media $mainPicture = null) |
||
309 | |||
310 | /** |
||
311 | * Get sliderImage |
||
312 | * |
||
313 | 7 | * @return \Application\Sonata\MediaBundle\Entity\Media |
|
314 | */ |
||
315 | 7 | public function getSliderImage() |
|
319 | |||
320 | /** |
||
321 | * Set sliderImage |
||
322 | * |
||
323 | * @param \Application\Sonata\MediaBundle\Entity\Media $sliderImage |
||
324 | * @return Performance |
||
325 | */ |
||
326 | public function setSliderImage(\Application\Sonata\MediaBundle\Entity\Media $sliderImage = null) |
||
332 | |||
333 | /** |
||
334 | * Get slug |
||
335 | * |
||
336 | 6 | * @return string |
|
337 | */ |
||
338 | 6 | public function getSlug() |
|
342 | |||
343 | /** |
||
344 | * Set slug |
||
345 | * |
||
346 | * @param string $slug |
||
347 | * @return Performance |
||
348 | */ |
||
349 | public function setSlug($slug) |
||
355 | |||
356 | /** |
||
357 | * Add performanceEvent |
||
358 | * |
||
359 | * @param \AppBundle\Entity\PerformanceEvent $performanceEvent |
||
360 | * @return Performance |
||
361 | */ |
||
362 | public function addPerformanceEvent(\AppBundle\Entity\PerformanceEvent $performanceEvent) |
||
368 | |||
369 | /** |
||
370 | * Remove performanceEvent |
||
371 | * |
||
372 | * @param \AppBundle\Entity\PerformanceEvent $performanceEvent |
||
373 | */ |
||
374 | public function removePerformanceEvent(\AppBundle\Entity\PerformanceEvent $performanceEvent) |
||
378 | |||
379 | /** |
||
380 | * Get performanceEvents |
||
381 | * |
||
382 | 2 | * @return \Doctrine\Common\Collections\Collection |
|
383 | */ |
||
384 | 2 | public function getPerformanceEvents() |
|
388 | |||
389 | /** |
||
390 | * Add role |
||
391 | * |
||
392 | * @param \AppBundle\Entity\Role $role |
||
393 | * @return Performance |
||
394 | */ |
||
395 | public function addRole(\AppBundle\Entity\Role $role) |
||
402 | |||
403 | /** |
||
404 | * Remove role |
||
405 | * |
||
406 | * @param \AppBundle\Entity\Role $role |
||
407 | */ |
||
408 | public function removeRole(\AppBundle\Entity\Role $role) |
||
412 | |||
413 | /** |
||
414 | * Get roles |
||
415 | * |
||
416 | 2 | * @return \Doctrine\Common\Collections\Collection |
|
417 | */ |
||
418 | 2 | public function getRoles() |
|
422 | |||
423 | 1 | public function __toString() |
|
427 | |||
428 | /** |
||
429 | * Get title |
||
430 | * |
||
431 | 1 | * @return string |
|
432 | */ |
||
433 | 1 | public function getTitle() |
|
437 | |||
438 | /** |
||
439 | * Set title |
||
440 | * |
||
441 | * @param string $title |
||
442 | * @return Performance |
||
443 | */ |
||
444 | public function setTitle($title) |
||
450 | |||
451 | /** |
||
452 | * Add galleryHasMedia |
||
453 | * |
||
454 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
455 | * @return Performance |
||
456 | */ |
||
457 | public function addGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
463 | |||
464 | /** |
||
465 | * Remove galleryHasMedia |
||
466 | * |
||
467 | * @param \Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia |
||
468 | */ |
||
469 | public function removeGalleryHasMedia(\Application\Sonata\MediaBundle\Entity\GalleryHasMedia $galleryHasMedia) |
||
473 | |||
474 | /** |
||
475 | * Get galleryHasMedia |
||
476 | * |
||
477 | 6 | * @return \Doctrine\Common\Collections\Collection |
|
478 | */ |
||
479 | 6 | public function getGalleryHasMedia() |
|
483 | |||
484 | /** |
||
485 | * @return History |
||
486 | */ |
||
487 | public function getFestival() |
||
488 | { |
||
489 | return $this->festival; |
||
490 | } |
||
491 | |||
492 | /** |
||
493 | * @param History $festival |
||
494 | * @return $this |
||
495 | */ |
||
496 | public function setFestival($festival) |
||
502 | } |
||
503 |