| @@ 24-203 (lines=180) @@ | ||
| 21 | * @Gedmo\TranslationEntity(class="AppBundle\Entity\Translations\PriceCategoryTranslation") |
|
| 22 | * @ExclusionPolicy("all") |
|
| 23 | */ |
|
| 24 | class PriceCategory extends AbstractPersonalTranslatable implements TranslatableInterface |
|
| 25 | { |
|
| 26 | /** |
|
| 27 | * @var integer |
|
| 28 | * |
|
| 29 | * @ORM\Column(name="id", type="integer") |
|
| 30 | * @ORM\Id |
|
| 31 | * @ORM\GeneratedValue(strategy="AUTO") |
|
| 32 | */ |
|
| 33 | protected $id; |
|
| 34 | ||
| 35 | /** |
|
| 36 | * @var string |
|
| 37 | * @Gedmo\Translatable |
|
| 38 | * @Assert\NotBlank() |
|
| 39 | * @ORM\Column(type="string", length=255) |
|
| 40 | * @Serializer\Groups({"get_ticket"}) |
|
| 41 | * @Type("string") |
|
| 42 | * @Expose() |
|
| 43 | */ |
|
| 44 | protected $title; |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @var string |
|
| 48 | * @Assert\NotBlank() |
|
| 49 | * @ORM\Column(type="string", length=255) |
|
| 50 | * @Type("string") |
|
| 51 | * @Serializer\Groups({"get_ticket"}) |
|
| 52 | * @Expose() |
|
| 53 | */ |
|
| 54 | protected $color; |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @var ArrayCollection|Translation[] |
|
| 58 | * |
|
| 59 | * @ORM\OneToMany( |
|
| 60 | * targetEntity="AppBundle\Entity\Translations\PriceCategoryTranslation", |
|
| 61 | * mappedBy="object", |
|
| 62 | * cascade={"persist", "remove"} |
|
| 63 | * ) |
|
| 64 | */ |
|
| 65 | protected $translations; |
|
| 66 | ||
| 67 | /** |
|
| 68 | * @var Venue |
|
| 69 | * |
|
| 70 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Venue", inversedBy="priceCategories") |
|
| 71 | * @Type("AppBundle\Entity\Venue") |
|
| 72 | * @Expose() |
|
| 73 | */ |
|
| 74 | protected $venue; |
|
| 75 | ||
| 76 | /** |
|
| 77 | * @var Collection|Seat[] |
|
| 78 | * |
|
| 79 | * @ORM\OneToMany( |
|
| 80 | * targetEntity="AppBundle\Entity\Seat", |
|
| 81 | * mappedBy="priceCategory", |
|
| 82 | * cascade={"persist"} |
|
| 83 | * ) |
|
| 84 | */ |
|
| 85 | protected $seats; |
|
| 86 | ||
| 87 | ||
| 88 | /** |
|
| 89 | * PriceCategory constructor. |
|
| 90 | */ |
|
| 91 | public function __construct() |
|
| 92 | { |
|
| 93 | parent::__construct(); |
|
| 94 | $this->seats = new ArrayCollection(); |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * @return integer |
|
| 99 | */ |
|
| 100 | public function getId() |
|
| 101 | { |
|
| 102 | return $this->id; |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * @return PriceCategory |
|
| 107 | */ |
|
| 108 | public function unsetTranslations() |
|
| 109 | { |
|
| 110 | $this->translations = null; |
|
| 111 | ||
| 112 | return $this; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * @return string |
|
| 117 | */ |
|
| 118 | public function getTitle() |
|
| 119 | { |
|
| 120 | return $this->title; |
|
| 121 | } |
|
| 122 | ||
| 123 | /** |
|
| 124 | * @param string $color |
|
| 125 | * @return PriceCategory |
|
| 126 | */ |
|
| 127 | public function setColor($color) |
|
| 128 | { |
|
| 129 | $this->color = $color; |
|
| 130 | ||
| 131 | return $this; |
|
| 132 | } |
|
| 133 | ||
| 134 | /** |
|
| 135 | * @return string |
|
| 136 | */ |
|
| 137 | public function getColor() |
|
| 138 | { |
|
| 139 | return $this->color; |
|
| 140 | } |
|
| 141 | ||
| 142 | /** |
|
| 143 | * @param string $title |
|
| 144 | * @return PriceCategory |
|
| 145 | */ |
|
| 146 | public function setTitle($title) |
|
| 147 | { |
|
| 148 | $this->title = $title; |
|
| 149 | ||
| 150 | return $this; |
|
| 151 | } |
|
| 152 | ||
| 153 | /** |
|
| 154 | * @return Venue |
|
| 155 | */ |
|
| 156 | public function getVenue() |
|
| 157 | { |
|
| 158 | return $this->venue; |
|
| 159 | } |
|
| 160 | ||
| 161 | /** |
|
| 162 | * @param Seat $seat |
|
| 163 | * @return PriceCategory |
|
| 164 | */ |
|
| 165 | public function addSeat(Seat $seat) |
|
| 166 | { |
|
| 167 | $this->seats[] = $seat; |
|
| 168 | ||
| 169 | return $this; |
|
| 170 | } |
|
| 171 | ||
| 172 | /** |
|
| 173 | * @param Seat $seat |
|
| 174 | */ |
|
| 175 | public function removeSeat(Seat $seat) |
|
| 176 | { |
|
| 177 | $this->seats->removeElement($seat); |
|
| 178 | } |
|
| 179 | ||
| 180 | /** |
|
| 181 | * @return Collection |
|
| 182 | */ |
|
| 183 | public function getSeat() |
|
| 184 | { |
|
| 185 | return $this->seats; |
|
| 186 | } |
|
| 187 | ||
| 188 | /** |
|
| 189 | * @return string |
|
| 190 | */ |
|
| 191 | public function __toString() |
|
| 192 | { |
|
| 193 | return $this->getTitle(); |
|
| 194 | } |
|
| 195 | ||
| 196 | /** |
|
| 197 | * @param Venue $venue |
|
| 198 | */ |
|
| 199 | public function setVenue(Venue $venue) |
|
| 200 | { |
|
| 201 | $this->venue = $venue; |
|
| 202 | } |
|
| 203 | } |
|
| 204 | ||
| @@ 23-193 (lines=171) @@ | ||
| 20 | * @Gedmo\TranslationEntity(class="AppBundle\Entity\Translations\VenueSectorTranslation") |
|
| 21 | * @ExclusionPolicy("all") |
|
| 22 | */ |
|
| 23 | class VenueSector extends AbstractPersonalTranslatable implements TranslatableInterface |
|
| 24 | { |
|
| 25 | /** |
|
| 26 | * @var integer |
|
| 27 | * |
|
| 28 | * @ORM\Column(name="id", type="integer") |
|
| 29 | * @ORM\Id |
|
| 30 | * @ORM\GeneratedValue(strategy="AUTO") |
|
| 31 | */ |
|
| 32 | protected $id; |
|
| 33 | ||
| 34 | /** |
|
| 35 | * @var string |
|
| 36 | * @Gedmo\Translatable |
|
| 37 | * @Assert\NotBlank() |
|
| 38 | * @ORM\Column(type="string", length=255) |
|
| 39 | * @Type("string") |
|
| 40 | * @Expose() |
|
| 41 | */ |
|
| 42 | protected $title; |
|
| 43 | ||
| 44 | /** |
|
| 45 | * @var ArrayCollection|Translation[] |
|
| 46 | * |
|
| 47 | * @ORM\OneToMany( |
|
| 48 | * targetEntity="AppBundle\Entity\Translations\VenueSectorTranslation", |
|
| 49 | * mappedBy="object", |
|
| 50 | * cascade={"persist", "remove"} |
|
| 51 | * ) |
|
| 52 | */ |
|
| 53 | protected $translations; |
|
| 54 | ||
| 55 | /** |
|
| 56 | * @var Venue |
|
| 57 | * |
|
| 58 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Venue", inversedBy="venueSectors") |
|
| 59 | * @Type("AppBundle\Entity\Venue") |
|
| 60 | * @Expose() |
|
| 61 | */ |
|
| 62 | protected $venue; |
|
| 63 | ||
| 64 | /** |
|
| 65 | * @var Collection|Seat[] |
|
| 66 | * |
|
| 67 | * @ORM\OneToMany( |
|
| 68 | * targetEntity="AppBundle\Entity\Seat", |
|
| 69 | * mappedBy="venueSector", |
|
| 70 | * cascade={"persist", "remove"} |
|
| 71 | * ) |
|
| 72 | */ |
|
| 73 | protected $seats; |
|
| 74 | ||
| 75 | /** |
|
| 76 | * @ORM\Column(name="slug", type="string", length=255) |
|
| 77 | * @Type("string") |
|
| 78 | * @Expose |
|
| 79 | */ |
|
| 80 | private $slug; |
|
| 81 | ||
| 82 | /** |
|
| 83 | * VenueSector constructor. |
|
| 84 | */ |
|
| 85 | public function __construct() |
|
| 86 | { |
|
| 87 | parent::__construct(); |
|
| 88 | $this->seats = new ArrayCollection(); |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * @return integer |
|
| 93 | */ |
|
| 94 | public function getId() |
|
| 95 | { |
|
| 96 | return $this->id; |
|
| 97 | } |
|
| 98 | ||
| 99 | /** |
|
| 100 | * @return VenueSector |
|
| 101 | */ |
|
| 102 | public function unsetTranslations() |
|
| 103 | { |
|
| 104 | $this->translations = null; |
|
| 105 | ||
| 106 | return $this; |
|
| 107 | } |
|
| 108 | ||
| 109 | /** |
|
| 110 | * @return string |
|
| 111 | */ |
|
| 112 | public function getTitle() |
|
| 113 | { |
|
| 114 | return $this->title; |
|
| 115 | } |
|
| 116 | ||
| 117 | /** |
|
| 118 | * @param string $title |
|
| 119 | * @return VenueSector |
|
| 120 | */ |
|
| 121 | public function setTitle($title) |
|
| 122 | { |
|
| 123 | $this->title = $title; |
|
| 124 | ||
| 125 | return $this; |
|
| 126 | } |
|
| 127 | ||
| 128 | /** |
|
| 129 | * @return Venue |
|
| 130 | */ |
|
| 131 | public function getVenue() |
|
| 132 | { |
|
| 133 | return $this->venue; |
|
| 134 | } |
|
| 135 | ||
| 136 | /** |
|
| 137 | * @param Seat $seat |
|
| 138 | * @return VenueSector |
|
| 139 | */ |
|
| 140 | public function addSeat(Seat $seat) |
|
| 141 | { |
|
| 142 | $this->seats[] = $seat; |
|
| 143 | ||
| 144 | return $this; |
|
| 145 | } |
|
| 146 | ||
| 147 | /** |
|
| 148 | * @param Seat $seat |
|
| 149 | */ |
|
| 150 | public function removeSeat(Seat $seat) |
|
| 151 | { |
|
| 152 | $this->seats->removeElement($seat); |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * @return Collection |
|
| 157 | */ |
|
| 158 | public function getSeat() |
|
| 159 | { |
|
| 160 | return $this->seats; |
|
| 161 | } |
|
| 162 | ||
| 163 | /** |
|
| 164 | * Get slug |
|
| 165 | * |
|
| 166 | * @return string |
|
| 167 | */ |
|
| 168 | public function getSlug() |
|
| 169 | { |
|
| 170 | return $this->slug; |
|
| 171 | } |
|
| 172 | ||
| 173 | /** |
|
| 174 | * Set slug |
|
| 175 | * |
|
| 176 | * @param string $slug |
|
| 177 | * @return VenueSector |
|
| 178 | */ |
|
| 179 | public function setSlug($slug) |
|
| 180 | { |
|
| 181 | $this->slug = $slug; |
|
| 182 | ||
| 183 | return $this; |
|
| 184 | } |
|
| 185 | ||
| 186 | /** |
|
| 187 | * @return string |
|
| 188 | */ |
|
| 189 | public function __toString() |
|
| 190 | { |
|
| 191 | return $this->getTitle(); |
|
| 192 | } |
|
| 193 | } |
|
| 194 | ||