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