1 | <?php |
||
25 | class Role extends AbstractPersonalTranslatable implements TranslatableInterface |
||
26 | { |
||
27 | use TimestampableTrait, BlameableEntity, DeletedByTrait; |
||
28 | |||
29 | /** |
||
30 | * @var integer |
||
31 | * |
||
32 | * @ORM\Column(name="id", type="integer") |
||
33 | * @ORM\Id |
||
34 | * @ORM\GeneratedValue(strategy="AUTO") |
||
35 | */ |
||
36 | private $id; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | * @Gedmo\Translatable |
||
41 | * @Assert\NotBlank() |
||
42 | * @ORM\Column(type="string", length=255) |
||
43 | * @Type("string") |
||
44 | * @Expose |
||
45 | */ |
||
46 | private $title; |
||
47 | |||
48 | /** |
||
49 | * @var string |
||
50 | * @Gedmo\Translatable |
||
51 | * @ORM\Column(type="text", nullable=true) |
||
52 | * @Type("string") |
||
53 | * @Expose |
||
54 | */ |
||
55 | private $description; |
||
56 | |||
57 | /** |
||
58 | * @var Performance |
||
59 | * |
||
60 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Performance", inversedBy="roles") |
||
61 | * @Expose() |
||
62 | */ |
||
63 | private $performance; |
||
64 | |||
65 | /** |
||
66 | * @var Employee |
||
67 | * |
||
68 | * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Employee", inversedBy="roles") |
||
69 | * @Type("AppBundle\Entity\Employee") |
||
70 | * @Expose |
||
71 | */ |
||
72 | private $employee; |
||
73 | |||
74 | /** |
||
75 | * @Gedmo\Slug(fields={"title"}) |
||
76 | * @ORM\Column(name="slug", type="string", length=255) |
||
77 | * @Type("string") |
||
78 | * @Expose |
||
79 | */ |
||
80 | private $slug; |
||
81 | |||
82 | /** |
||
83 | * @var ArrayCollection |
||
84 | * |
||
85 | * @ORM\OneToMany( |
||
86 | * targetEntity="AppBundle\Entity\Translations\RoleTranslation", |
||
87 | * mappedBy="object", |
||
88 | * cascade={"persist", "remove"} |
||
89 | * ) |
||
90 | */ |
||
91 | protected $translations; |
||
92 | |||
93 | /** |
||
94 | * Unset translations |
||
95 | * |
||
96 | * @return Role |
||
97 | */ |
||
98 | 2 | public function unsetTranslations() |
|
104 | |||
105 | /** |
||
106 | * Get id |
||
107 | * |
||
108 | * @return integer |
||
109 | */ |
||
110 | 2 | public function getId() |
|
114 | |||
115 | /** |
||
116 | * Get title |
||
117 | * |
||
118 | * @return string |
||
119 | */ |
||
120 | 5 | public function getTitle() |
|
124 | |||
125 | /** |
||
126 | * Set title |
||
127 | * |
||
128 | * @param string $title |
||
129 | * @return Role |
||
130 | */ |
||
131 | public function setTitle($title) |
||
137 | |||
138 | /** |
||
139 | * Get description |
||
140 | * |
||
141 | * @return string |
||
142 | */ |
||
143 | 3 | public function getDescription() |
|
147 | |||
148 | /** |
||
149 | * Set description |
||
150 | * |
||
151 | * @param string $description |
||
152 | * @return Role |
||
153 | */ |
||
154 | public function setDescription($description) |
||
160 | |||
161 | /** |
||
162 | * Get slug |
||
163 | * |
||
164 | * @return string |
||
165 | */ |
||
166 | public function getSlug() |
||
170 | |||
171 | /** |
||
172 | * Set slug |
||
173 | * |
||
174 | * @param string $slug |
||
175 | * @return Role |
||
176 | */ |
||
177 | public function setSlug($slug) |
||
183 | |||
184 | /** |
||
185 | * Get performance |
||
186 | * |
||
187 | * @return Performance |
||
188 | */ |
||
189 | 3 | public function getPerformance() |
|
193 | |||
194 | /** |
||
195 | * Set performance |
||
196 | * |
||
197 | * @param Performance $performance |
||
198 | * @return Role |
||
199 | */ |
||
200 | public function setPerformance(Performance $performance = null) |
||
206 | |||
207 | /** |
||
208 | * Get employee |
||
209 | * |
||
210 | * @return Employee |
||
211 | */ |
||
212 | 5 | public function getEmployee() |
|
216 | |||
217 | /** |
||
218 | * Set employee |
||
219 | * |
||
220 | * @param Employee $employee |
||
221 | * @return Role |
||
222 | */ |
||
223 | public function setEmployee(Employee $employee = null) |
||
229 | |||
230 | /** |
||
231 | * @return string |
||
232 | */ |
||
233 | 4 | public function __toString() |
|
237 | } |
||
238 |