1 | <?php |
||
22 | class PriceCategory extends AbstractPersonalTranslatable implements TranslatableInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var integer |
||
26 | * |
||
27 | * @ORM\Column(name="id", type="integer") |
||
28 | * @ORM\Id |
||
29 | * @ORM\GeneratedValue(strategy="AUTO") |
||
30 | */ |
||
31 | protected $id; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | * @Assert\NotBlank() |
||
36 | * @ORM\Column(type="string", length=255) |
||
37 | * @Type("string") |
||
38 | * @Expose() |
||
39 | */ |
||
40 | protected $rows; |
||
41 | |||
42 | /** |
||
43 | * @var string |
||
44 | * @Assert\NotBlank() |
||
45 | * @ORM\Column(type="string", length=255) |
||
46 | * @Type("string") |
||
47 | * @Expose() |
||
48 | */ |
||
49 | protected $places; |
||
50 | /** |
||
51 | * @var string |
||
52 | * @Assert\NotBlank() |
||
53 | * @ORM\Column(type="string", length=255) |
||
54 | * @Type("string") |
||
55 | * @Expose() |
||
56 | */ |
||
57 | protected $color; |
||
58 | |||
59 | /** |
||
60 | * @var integer |
||
61 | * @Assert\NotBlank() |
||
62 | * @ORM\Column(type="integer") |
||
63 | * @Type("integer") |
||
64 | * @Expose() |
||
65 | */ |
||
66 | protected $price; |
||
67 | |||
68 | /** |
||
69 | * @var ArrayCollection|Translation[] |
||
70 | * |
||
71 | * @ORM\OneToMany( |
||
72 | * targetEntity="AppBundle\Entity\Translations\PriceCategoryTranslation", |
||
73 | * mappedBy="object", |
||
74 | * cascade={"persist", "remove"} |
||
75 | * ) |
||
76 | */ |
||
77 | protected $translations; |
||
78 | |||
79 | /** |
||
80 | * @var PerformanceEvent |
||
81 | * |
||
82 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\PerformanceEvent", inversedBy="priceCategories") |
||
83 | * @Type("AppBundle\Entity\PerformanceEvent") |
||
84 | * @Expose() |
||
85 | */ |
||
86 | protected $performanceEvent; |
||
87 | |||
88 | /** |
||
89 | * @var VenueSector |
||
90 | * |
||
91 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\VenueSector", inversedBy="priceCategories") |
||
92 | * @Type("AppBundle\Entity\VenueSector") |
||
93 | * @Expose() |
||
94 | */ |
||
95 | protected $venueSector; |
||
96 | |||
97 | /** |
||
98 | * @return integer |
||
99 | */ |
||
100 | public function getId() |
||
104 | |||
105 | /** |
||
106 | * @return PriceCategory |
||
107 | */ |
||
108 | public function unsetTranslations() |
||
114 | |||
115 | /** |
||
116 | * @return string |
||
117 | */ |
||
118 | public function getTitle() |
||
122 | |||
123 | /** |
||
124 | * @param string $color |
||
125 | * @return PriceCategory |
||
126 | */ |
||
127 | public function setColor($color) |
||
133 | |||
134 | /** |
||
135 | * @return string |
||
136 | */ |
||
137 | public function getColor() |
||
141 | |||
142 | /** |
||
143 | * @param string $title |
||
144 | * @return PriceCategory |
||
145 | */ |
||
146 | public function setTitle($title) |
||
152 | |||
153 | /** |
||
154 | * @return string |
||
155 | */ |
||
156 | public function __toString() |
||
160 | |||
161 | /** |
||
162 | * @return VenueSector |
||
163 | */ |
||
164 | public function getVenueSector(): VenueSector |
||
168 | |||
169 | /** |
||
170 | * @param VenueSector $venueSector |
||
171 | */ |
||
172 | public function setVenueSector(VenueSector $venueSector) |
||
176 | } |
||
177 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: