@@ -12,260 +12,260 @@ |
||
12 | 12 | */ |
13 | 13 | class User |
14 | 14 | { |
15 | - /** |
|
16 | - * @var integer |
|
17 | - * |
|
18 | - * @ORM\Column(name="id", type="integer", nullable=false) |
|
19 | - * @ORM\Id |
|
20 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
21 | - */ |
|
22 | - private $id; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var string |
|
26 | - * |
|
27 | - * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
28 | - */ |
|
29 | - private $guid; |
|
30 | - |
|
31 | - /** |
|
32 | - * @var string |
|
33 | - * |
|
34 | - * @ORM\Column(name="firstname", type="string", length=255, nullable=false) |
|
35 | - */ |
|
36 | - private $firstname; |
|
37 | - |
|
38 | - /** |
|
39 | - * @var string |
|
40 | - * |
|
41 | - * @ORM\Column(name="lastname", type="string", length=255, nullable=false) |
|
42 | - */ |
|
43 | - private $lastname; |
|
44 | - |
|
45 | - /** |
|
46 | - * @var string |
|
47 | - * |
|
48 | - * @ORM\Column(name="adress", type="string", length=255, nullable=true) |
|
49 | - */ |
|
50 | - private $adress; |
|
51 | - |
|
52 | - /** |
|
53 | - * @var string |
|
54 | - * |
|
55 | - * @ORM\Column(name="postal_code", type="string", length=100, nullable=true) |
|
56 | - */ |
|
57 | - private $postalCode; |
|
58 | - |
|
59 | - /** |
|
60 | - * @var string |
|
61 | - * |
|
62 | - * @ORM\Column(name="country", type="string", length=100, nullable=true) |
|
63 | - */ |
|
64 | - private $country; |
|
65 | - |
|
66 | - /** |
|
67 | - * @var string |
|
68 | - * |
|
69 | - * @ORM\Column(name="state", type="string", length=255, nullable=true) |
|
70 | - */ |
|
71 | - private $state; |
|
72 | - |
|
73 | - /** |
|
74 | - * @var string |
|
75 | - * |
|
76 | - * @ORM\Column(name="access_rights", type="text", nullable=true) |
|
77 | - */ |
|
78 | - private $accessRights; |
|
79 | - |
|
80 | - /** |
|
81 | - * @var \DateTime |
|
82 | - * |
|
83 | - * @ORM\Column(name="creation_date", type="date", nullable=true) |
|
84 | - */ |
|
85 | - private $creationDate; |
|
86 | - |
|
87 | - /** |
|
88 | - * @var \DateTime |
|
89 | - * |
|
90 | - * @ORM\Column(name="update_date", type="date", nullable=true) |
|
91 | - */ |
|
92 | - private $updateDate; |
|
93 | - |
|
94 | - /** |
|
95 | - * @return int |
|
96 | - */ |
|
97 | - public function getId() |
|
98 | - { |
|
99 | - return $this->id; |
|
100 | - } |
|
101 | - |
|
102 | - /** |
|
103 | - * @param int $id |
|
104 | - */ |
|
105 | - public function setId($id) |
|
106 | - { |
|
107 | - $this->id = $id; |
|
108 | - } |
|
109 | - |
|
110 | - /** |
|
111 | - * @return string |
|
112 | - */ |
|
113 | - public function getGuid() |
|
114 | - { |
|
115 | - return $this->guid; |
|
116 | - } |
|
117 | - |
|
118 | - /** |
|
119 | - * @param string $guid |
|
120 | - */ |
|
121 | - public function setGuid($guid) |
|
122 | - { |
|
123 | - $this->guid = $guid; |
|
124 | - } |
|
125 | - |
|
126 | - /** |
|
127 | - * @return string |
|
128 | - */ |
|
129 | - public function getFirstname() |
|
130 | - { |
|
131 | - return $this->firstname; |
|
132 | - } |
|
133 | - |
|
134 | - /** |
|
135 | - * @param string $firstname |
|
136 | - */ |
|
137 | - public function setFirstname($firstname) |
|
138 | - { |
|
139 | - $this->firstname = $firstname; |
|
140 | - } |
|
141 | - |
|
142 | - /** |
|
143 | - * @return string |
|
144 | - */ |
|
145 | - public function getLastname() |
|
146 | - { |
|
147 | - return $this->lastname; |
|
148 | - } |
|
149 | - |
|
150 | - /** |
|
151 | - * @param string $lastname |
|
152 | - */ |
|
153 | - public function setLastname($lastname) |
|
154 | - { |
|
155 | - $this->lastname = $lastname; |
|
156 | - } |
|
157 | - |
|
158 | - /** |
|
159 | - * @return string |
|
160 | - */ |
|
161 | - public function getAdress() |
|
162 | - { |
|
163 | - return $this->adress; |
|
164 | - } |
|
165 | - |
|
166 | - /** |
|
167 | - * @param string $adress |
|
168 | - */ |
|
169 | - public function setAdress($adress) |
|
170 | - { |
|
171 | - $this->adress = $adress; |
|
172 | - } |
|
173 | - |
|
174 | - /** |
|
175 | - * @return string |
|
176 | - */ |
|
177 | - public function getPostalCode() |
|
178 | - { |
|
179 | - return $this->postalCode; |
|
180 | - } |
|
181 | - |
|
182 | - /** |
|
183 | - * @param string $postalCode |
|
184 | - */ |
|
185 | - public function setPostalCode($postalCode) |
|
186 | - { |
|
187 | - $this->postalCode = $postalCode; |
|
188 | - } |
|
189 | - |
|
190 | - /** |
|
191 | - * @return string |
|
192 | - */ |
|
193 | - public function getCountry() |
|
194 | - { |
|
195 | - return $this->country; |
|
196 | - } |
|
197 | - |
|
198 | - /** |
|
199 | - * @param string $country |
|
200 | - */ |
|
201 | - public function setCountry($country) |
|
202 | - { |
|
203 | - $this->country = $country; |
|
204 | - } |
|
205 | - |
|
206 | - /** |
|
207 | - * @return string |
|
208 | - */ |
|
209 | - public function getState() |
|
210 | - { |
|
211 | - return $this->state; |
|
212 | - } |
|
213 | - |
|
214 | - /** |
|
215 | - * @param string $state |
|
216 | - */ |
|
217 | - public function setState($state) |
|
218 | - { |
|
219 | - $this->state = $state; |
|
220 | - } |
|
221 | - |
|
222 | - /** |
|
223 | - * @return string |
|
224 | - */ |
|
225 | - public function getAccessRights() |
|
226 | - { |
|
227 | - return $this->accessRights; |
|
228 | - } |
|
229 | - |
|
230 | - /** |
|
231 | - * @param string $accessRights |
|
232 | - */ |
|
233 | - public function setAccessRights($accessRights) |
|
234 | - { |
|
235 | - $this->accessRights = $accessRights; |
|
236 | - } |
|
237 | - |
|
238 | - /** |
|
239 | - * @return \DateTime |
|
240 | - */ |
|
241 | - public function getCreationDate() |
|
242 | - { |
|
243 | - return $this->creationDate; |
|
244 | - } |
|
245 | - |
|
246 | - /** |
|
247 | - * @param \DateTime $creationDate |
|
248 | - */ |
|
249 | - public function setCreationDate($creationDate) |
|
250 | - { |
|
251 | - $this->creationDate = $creationDate; |
|
252 | - } |
|
253 | - |
|
254 | - /** |
|
255 | - * @return \DateTime |
|
256 | - */ |
|
257 | - public function getUpdateDate() |
|
258 | - { |
|
259 | - return $this->updateDate; |
|
260 | - } |
|
261 | - |
|
262 | - /** |
|
263 | - * @param \DateTime $updateDate |
|
264 | - */ |
|
265 | - public function setUpdateDate($updateDate) |
|
266 | - { |
|
267 | - $this->updateDate = $updateDate; |
|
268 | - } |
|
15 | + /** |
|
16 | + * @var integer |
|
17 | + * |
|
18 | + * @ORM\Column(name="id", type="integer", nullable=false) |
|
19 | + * @ORM\Id |
|
20 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
21 | + */ |
|
22 | + private $id; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var string |
|
26 | + * |
|
27 | + * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
28 | + */ |
|
29 | + private $guid; |
|
30 | + |
|
31 | + /** |
|
32 | + * @var string |
|
33 | + * |
|
34 | + * @ORM\Column(name="firstname", type="string", length=255, nullable=false) |
|
35 | + */ |
|
36 | + private $firstname; |
|
37 | + |
|
38 | + /** |
|
39 | + * @var string |
|
40 | + * |
|
41 | + * @ORM\Column(name="lastname", type="string", length=255, nullable=false) |
|
42 | + */ |
|
43 | + private $lastname; |
|
44 | + |
|
45 | + /** |
|
46 | + * @var string |
|
47 | + * |
|
48 | + * @ORM\Column(name="adress", type="string", length=255, nullable=true) |
|
49 | + */ |
|
50 | + private $adress; |
|
51 | + |
|
52 | + /** |
|
53 | + * @var string |
|
54 | + * |
|
55 | + * @ORM\Column(name="postal_code", type="string", length=100, nullable=true) |
|
56 | + */ |
|
57 | + private $postalCode; |
|
58 | + |
|
59 | + /** |
|
60 | + * @var string |
|
61 | + * |
|
62 | + * @ORM\Column(name="country", type="string", length=100, nullable=true) |
|
63 | + */ |
|
64 | + private $country; |
|
65 | + |
|
66 | + /** |
|
67 | + * @var string |
|
68 | + * |
|
69 | + * @ORM\Column(name="state", type="string", length=255, nullable=true) |
|
70 | + */ |
|
71 | + private $state; |
|
72 | + |
|
73 | + /** |
|
74 | + * @var string |
|
75 | + * |
|
76 | + * @ORM\Column(name="access_rights", type="text", nullable=true) |
|
77 | + */ |
|
78 | + private $accessRights; |
|
79 | + |
|
80 | + /** |
|
81 | + * @var \DateTime |
|
82 | + * |
|
83 | + * @ORM\Column(name="creation_date", type="date", nullable=true) |
|
84 | + */ |
|
85 | + private $creationDate; |
|
86 | + |
|
87 | + /** |
|
88 | + * @var \DateTime |
|
89 | + * |
|
90 | + * @ORM\Column(name="update_date", type="date", nullable=true) |
|
91 | + */ |
|
92 | + private $updateDate; |
|
93 | + |
|
94 | + /** |
|
95 | + * @return int |
|
96 | + */ |
|
97 | + public function getId() |
|
98 | + { |
|
99 | + return $this->id; |
|
100 | + } |
|
101 | + |
|
102 | + /** |
|
103 | + * @param int $id |
|
104 | + */ |
|
105 | + public function setId($id) |
|
106 | + { |
|
107 | + $this->id = $id; |
|
108 | + } |
|
109 | + |
|
110 | + /** |
|
111 | + * @return string |
|
112 | + */ |
|
113 | + public function getGuid() |
|
114 | + { |
|
115 | + return $this->guid; |
|
116 | + } |
|
117 | + |
|
118 | + /** |
|
119 | + * @param string $guid |
|
120 | + */ |
|
121 | + public function setGuid($guid) |
|
122 | + { |
|
123 | + $this->guid = $guid; |
|
124 | + } |
|
125 | + |
|
126 | + /** |
|
127 | + * @return string |
|
128 | + */ |
|
129 | + public function getFirstname() |
|
130 | + { |
|
131 | + return $this->firstname; |
|
132 | + } |
|
133 | + |
|
134 | + /** |
|
135 | + * @param string $firstname |
|
136 | + */ |
|
137 | + public function setFirstname($firstname) |
|
138 | + { |
|
139 | + $this->firstname = $firstname; |
|
140 | + } |
|
141 | + |
|
142 | + /** |
|
143 | + * @return string |
|
144 | + */ |
|
145 | + public function getLastname() |
|
146 | + { |
|
147 | + return $this->lastname; |
|
148 | + } |
|
149 | + |
|
150 | + /** |
|
151 | + * @param string $lastname |
|
152 | + */ |
|
153 | + public function setLastname($lastname) |
|
154 | + { |
|
155 | + $this->lastname = $lastname; |
|
156 | + } |
|
157 | + |
|
158 | + /** |
|
159 | + * @return string |
|
160 | + */ |
|
161 | + public function getAdress() |
|
162 | + { |
|
163 | + return $this->adress; |
|
164 | + } |
|
165 | + |
|
166 | + /** |
|
167 | + * @param string $adress |
|
168 | + */ |
|
169 | + public function setAdress($adress) |
|
170 | + { |
|
171 | + $this->adress = $adress; |
|
172 | + } |
|
173 | + |
|
174 | + /** |
|
175 | + * @return string |
|
176 | + */ |
|
177 | + public function getPostalCode() |
|
178 | + { |
|
179 | + return $this->postalCode; |
|
180 | + } |
|
181 | + |
|
182 | + /** |
|
183 | + * @param string $postalCode |
|
184 | + */ |
|
185 | + public function setPostalCode($postalCode) |
|
186 | + { |
|
187 | + $this->postalCode = $postalCode; |
|
188 | + } |
|
189 | + |
|
190 | + /** |
|
191 | + * @return string |
|
192 | + */ |
|
193 | + public function getCountry() |
|
194 | + { |
|
195 | + return $this->country; |
|
196 | + } |
|
197 | + |
|
198 | + /** |
|
199 | + * @param string $country |
|
200 | + */ |
|
201 | + public function setCountry($country) |
|
202 | + { |
|
203 | + $this->country = $country; |
|
204 | + } |
|
205 | + |
|
206 | + /** |
|
207 | + * @return string |
|
208 | + */ |
|
209 | + public function getState() |
|
210 | + { |
|
211 | + return $this->state; |
|
212 | + } |
|
213 | + |
|
214 | + /** |
|
215 | + * @param string $state |
|
216 | + */ |
|
217 | + public function setState($state) |
|
218 | + { |
|
219 | + $this->state = $state; |
|
220 | + } |
|
221 | + |
|
222 | + /** |
|
223 | + * @return string |
|
224 | + */ |
|
225 | + public function getAccessRights() |
|
226 | + { |
|
227 | + return $this->accessRights; |
|
228 | + } |
|
229 | + |
|
230 | + /** |
|
231 | + * @param string $accessRights |
|
232 | + */ |
|
233 | + public function setAccessRights($accessRights) |
|
234 | + { |
|
235 | + $this->accessRights = $accessRights; |
|
236 | + } |
|
237 | + |
|
238 | + /** |
|
239 | + * @return \DateTime |
|
240 | + */ |
|
241 | + public function getCreationDate() |
|
242 | + { |
|
243 | + return $this->creationDate; |
|
244 | + } |
|
245 | + |
|
246 | + /** |
|
247 | + * @param \DateTime $creationDate |
|
248 | + */ |
|
249 | + public function setCreationDate($creationDate) |
|
250 | + { |
|
251 | + $this->creationDate = $creationDate; |
|
252 | + } |
|
253 | + |
|
254 | + /** |
|
255 | + * @return \DateTime |
|
256 | + */ |
|
257 | + public function getUpdateDate() |
|
258 | + { |
|
259 | + return $this->updateDate; |
|
260 | + } |
|
261 | + |
|
262 | + /** |
|
263 | + * @param \DateTime $updateDate |
|
264 | + */ |
|
265 | + public function setUpdateDate($updateDate) |
|
266 | + { |
|
267 | + $this->updateDate = $updateDate; |
|
268 | + } |
|
269 | 269 | |
270 | 270 | |
271 | 271 | } |
@@ -12,240 +12,240 @@ |
||
12 | 12 | */ |
13 | 13 | class Page |
14 | 14 | { |
15 | - /** |
|
16 | - * @var integer |
|
17 | - * |
|
18 | - * @ORM\Column(name="id", type="integer", nullable=false) |
|
19 | - * @ORM\Id |
|
20 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
21 | - */ |
|
22 | - private $id; |
|
23 | - |
|
24 | - /** |
|
25 | - * @var string |
|
26 | - * |
|
27 | - * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
28 | - */ |
|
29 | - private $guid; |
|
30 | - |
|
31 | - /** |
|
32 | - * @var string |
|
33 | - * |
|
34 | - * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
35 | - */ |
|
36 | - private $titleTag; |
|
37 | - |
|
38 | - /** |
|
39 | - * @var string |
|
40 | - * |
|
41 | - * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
42 | - */ |
|
43 | - private $descriptionTag; |
|
44 | - |
|
45 | - /** |
|
46 | - * @var string |
|
47 | - * |
|
48 | - * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
49 | - */ |
|
50 | - private $title; |
|
51 | - |
|
52 | - /** |
|
53 | - * @var string |
|
54 | - * |
|
55 | - * @ORM\Column(name="content", type="text", nullable=true) |
|
56 | - */ |
|
57 | - private $content; |
|
58 | - |
|
59 | - /** |
|
60 | - * @var integer |
|
61 | - * |
|
62 | - * @ORM\Column(name="active", type="integer", nullable=false) |
|
63 | - */ |
|
64 | - private $active; |
|
65 | - |
|
66 | - /** |
|
67 | - * @var integer |
|
68 | - * |
|
69 | - * @ORM\Column(name="order", type="integer", nullable=false) |
|
70 | - */ |
|
71 | - private $order; |
|
72 | - |
|
73 | - /** |
|
74 | - * @var integer |
|
75 | - * |
|
76 | - * @ORM\Column(name="displayed", type="integer", nullable=false) |
|
77 | - */ |
|
78 | - private $displayed; |
|
79 | - |
|
80 | - /** |
|
81 | - * @var \Page |
|
82 | - * |
|
83 | - * @ORM\ManyToOne(targetEntity="Page") |
|
84 | - * @ORM\JoinColumns({ |
|
85 | - * @ORM\JoinColumn(name="parent", referencedColumnName="id") |
|
86 | - * }) |
|
87 | - */ |
|
88 | - private $parent; |
|
89 | - |
|
90 | - /** |
|
91 | - * @return int |
|
92 | - */ |
|
93 | - public function getId() |
|
94 | - { |
|
95 | - return $this->id; |
|
96 | - } |
|
97 | - |
|
98 | - /** |
|
99 | - * @param int $id |
|
100 | - */ |
|
101 | - public function setId($id) |
|
102 | - { |
|
103 | - $this->id = $id; |
|
104 | - } |
|
105 | - |
|
106 | - /** |
|
107 | - * @return string |
|
108 | - */ |
|
109 | - public function getGuid() |
|
110 | - { |
|
111 | - return $this->guid; |
|
112 | - } |
|
113 | - |
|
114 | - /** |
|
115 | - * @param string $guid |
|
116 | - */ |
|
117 | - public function setGuid($guid) |
|
118 | - { |
|
119 | - $this->guid = $guid; |
|
120 | - } |
|
121 | - |
|
122 | - /** |
|
123 | - * @return string |
|
124 | - */ |
|
125 | - public function getTitleTag() |
|
126 | - { |
|
127 | - return $this->titleTag; |
|
128 | - } |
|
129 | - |
|
130 | - /** |
|
131 | - * @param string $titleTag |
|
132 | - */ |
|
133 | - public function setTitleTag($titleTag) |
|
134 | - { |
|
135 | - $this->titleTag = $titleTag; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return string |
|
140 | - */ |
|
141 | - public function getDescriptionTag() |
|
142 | - { |
|
143 | - return $this->descriptionTag; |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param string $descriptionTag |
|
148 | - */ |
|
149 | - public function setDescriptionTag($descriptionTag) |
|
150 | - { |
|
151 | - $this->descriptionTag = $descriptionTag; |
|
152 | - } |
|
153 | - |
|
154 | - /** |
|
155 | - * @return string |
|
156 | - */ |
|
157 | - public function getTitle() |
|
158 | - { |
|
159 | - return $this->title; |
|
160 | - } |
|
161 | - |
|
162 | - /** |
|
163 | - * @param string $title |
|
164 | - */ |
|
165 | - public function setTitle($title) |
|
166 | - { |
|
167 | - $this->title = $title; |
|
168 | - } |
|
169 | - |
|
170 | - /** |
|
171 | - * @return string |
|
172 | - */ |
|
173 | - public function getContent() |
|
174 | - { |
|
175 | - return $this->content; |
|
176 | - } |
|
177 | - |
|
178 | - /** |
|
179 | - * @param string $content |
|
180 | - */ |
|
181 | - public function setContent($content) |
|
182 | - { |
|
183 | - $this->content = $content; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @return int |
|
188 | - */ |
|
189 | - public function getActive() |
|
190 | - { |
|
191 | - return $this->active; |
|
192 | - } |
|
193 | - |
|
194 | - /** |
|
195 | - * @param int $active |
|
196 | - */ |
|
197 | - public function setActive($active) |
|
198 | - { |
|
199 | - $this->active = $active; |
|
200 | - } |
|
201 | - |
|
202 | - /** |
|
203 | - * @return int |
|
204 | - */ |
|
205 | - public function getOrder() |
|
206 | - { |
|
207 | - return $this->order; |
|
208 | - } |
|
209 | - |
|
210 | - /** |
|
211 | - * @param int $order |
|
212 | - */ |
|
213 | - public function setOrder($order) |
|
214 | - { |
|
215 | - $this->order = $order; |
|
216 | - } |
|
217 | - |
|
218 | - /** |
|
219 | - * @return int |
|
220 | - */ |
|
221 | - public function getDisplayed() |
|
222 | - { |
|
223 | - return $this->displayed; |
|
224 | - } |
|
225 | - |
|
226 | - /** |
|
227 | - * @param int $displayed |
|
228 | - */ |
|
229 | - public function setDisplayed($displayed) |
|
230 | - { |
|
231 | - $this->displayed = $displayed; |
|
232 | - } |
|
233 | - |
|
234 | - /** |
|
235 | - * @return \Page |
|
236 | - */ |
|
237 | - public function getParent() |
|
238 | - { |
|
239 | - return $this->parent; |
|
240 | - } |
|
241 | - |
|
242 | - /** |
|
243 | - * @param \Page $parent |
|
244 | - */ |
|
245 | - public function setParent($parent) |
|
246 | - { |
|
247 | - $this->parent = $parent; |
|
248 | - } |
|
15 | + /** |
|
16 | + * @var integer |
|
17 | + * |
|
18 | + * @ORM\Column(name="id", type="integer", nullable=false) |
|
19 | + * @ORM\Id |
|
20 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
21 | + */ |
|
22 | + private $id; |
|
23 | + |
|
24 | + /** |
|
25 | + * @var string |
|
26 | + * |
|
27 | + * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
28 | + */ |
|
29 | + private $guid; |
|
30 | + |
|
31 | + /** |
|
32 | + * @var string |
|
33 | + * |
|
34 | + * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
35 | + */ |
|
36 | + private $titleTag; |
|
37 | + |
|
38 | + /** |
|
39 | + * @var string |
|
40 | + * |
|
41 | + * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
42 | + */ |
|
43 | + private $descriptionTag; |
|
44 | + |
|
45 | + /** |
|
46 | + * @var string |
|
47 | + * |
|
48 | + * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
49 | + */ |
|
50 | + private $title; |
|
51 | + |
|
52 | + /** |
|
53 | + * @var string |
|
54 | + * |
|
55 | + * @ORM\Column(name="content", type="text", nullable=true) |
|
56 | + */ |
|
57 | + private $content; |
|
58 | + |
|
59 | + /** |
|
60 | + * @var integer |
|
61 | + * |
|
62 | + * @ORM\Column(name="active", type="integer", nullable=false) |
|
63 | + */ |
|
64 | + private $active; |
|
65 | + |
|
66 | + /** |
|
67 | + * @var integer |
|
68 | + * |
|
69 | + * @ORM\Column(name="order", type="integer", nullable=false) |
|
70 | + */ |
|
71 | + private $order; |
|
72 | + |
|
73 | + /** |
|
74 | + * @var integer |
|
75 | + * |
|
76 | + * @ORM\Column(name="displayed", type="integer", nullable=false) |
|
77 | + */ |
|
78 | + private $displayed; |
|
79 | + |
|
80 | + /** |
|
81 | + * @var \Page |
|
82 | + * |
|
83 | + * @ORM\ManyToOne(targetEntity="Page") |
|
84 | + * @ORM\JoinColumns({ |
|
85 | + * @ORM\JoinColumn(name="parent", referencedColumnName="id") |
|
86 | + * }) |
|
87 | + */ |
|
88 | + private $parent; |
|
89 | + |
|
90 | + /** |
|
91 | + * @return int |
|
92 | + */ |
|
93 | + public function getId() |
|
94 | + { |
|
95 | + return $this->id; |
|
96 | + } |
|
97 | + |
|
98 | + /** |
|
99 | + * @param int $id |
|
100 | + */ |
|
101 | + public function setId($id) |
|
102 | + { |
|
103 | + $this->id = $id; |
|
104 | + } |
|
105 | + |
|
106 | + /** |
|
107 | + * @return string |
|
108 | + */ |
|
109 | + public function getGuid() |
|
110 | + { |
|
111 | + return $this->guid; |
|
112 | + } |
|
113 | + |
|
114 | + /** |
|
115 | + * @param string $guid |
|
116 | + */ |
|
117 | + public function setGuid($guid) |
|
118 | + { |
|
119 | + $this->guid = $guid; |
|
120 | + } |
|
121 | + |
|
122 | + /** |
|
123 | + * @return string |
|
124 | + */ |
|
125 | + public function getTitleTag() |
|
126 | + { |
|
127 | + return $this->titleTag; |
|
128 | + } |
|
129 | + |
|
130 | + /** |
|
131 | + * @param string $titleTag |
|
132 | + */ |
|
133 | + public function setTitleTag($titleTag) |
|
134 | + { |
|
135 | + $this->titleTag = $titleTag; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return string |
|
140 | + */ |
|
141 | + public function getDescriptionTag() |
|
142 | + { |
|
143 | + return $this->descriptionTag; |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param string $descriptionTag |
|
148 | + */ |
|
149 | + public function setDescriptionTag($descriptionTag) |
|
150 | + { |
|
151 | + $this->descriptionTag = $descriptionTag; |
|
152 | + } |
|
153 | + |
|
154 | + /** |
|
155 | + * @return string |
|
156 | + */ |
|
157 | + public function getTitle() |
|
158 | + { |
|
159 | + return $this->title; |
|
160 | + } |
|
161 | + |
|
162 | + /** |
|
163 | + * @param string $title |
|
164 | + */ |
|
165 | + public function setTitle($title) |
|
166 | + { |
|
167 | + $this->title = $title; |
|
168 | + } |
|
169 | + |
|
170 | + /** |
|
171 | + * @return string |
|
172 | + */ |
|
173 | + public function getContent() |
|
174 | + { |
|
175 | + return $this->content; |
|
176 | + } |
|
177 | + |
|
178 | + /** |
|
179 | + * @param string $content |
|
180 | + */ |
|
181 | + public function setContent($content) |
|
182 | + { |
|
183 | + $this->content = $content; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @return int |
|
188 | + */ |
|
189 | + public function getActive() |
|
190 | + { |
|
191 | + return $this->active; |
|
192 | + } |
|
193 | + |
|
194 | + /** |
|
195 | + * @param int $active |
|
196 | + */ |
|
197 | + public function setActive($active) |
|
198 | + { |
|
199 | + $this->active = $active; |
|
200 | + } |
|
201 | + |
|
202 | + /** |
|
203 | + * @return int |
|
204 | + */ |
|
205 | + public function getOrder() |
|
206 | + { |
|
207 | + return $this->order; |
|
208 | + } |
|
209 | + |
|
210 | + /** |
|
211 | + * @param int $order |
|
212 | + */ |
|
213 | + public function setOrder($order) |
|
214 | + { |
|
215 | + $this->order = $order; |
|
216 | + } |
|
217 | + |
|
218 | + /** |
|
219 | + * @return int |
|
220 | + */ |
|
221 | + public function getDisplayed() |
|
222 | + { |
|
223 | + return $this->displayed; |
|
224 | + } |
|
225 | + |
|
226 | + /** |
|
227 | + * @param int $displayed |
|
228 | + */ |
|
229 | + public function setDisplayed($displayed) |
|
230 | + { |
|
231 | + $this->displayed = $displayed; |
|
232 | + } |
|
233 | + |
|
234 | + /** |
|
235 | + * @return \Page |
|
236 | + */ |
|
237 | + public function getParent() |
|
238 | + { |
|
239 | + return $this->parent; |
|
240 | + } |
|
241 | + |
|
242 | + /** |
|
243 | + * @param \Page $parent |
|
244 | + */ |
|
245 | + public function setParent($parent) |
|
246 | + { |
|
247 | + $this->parent = $parent; |
|
248 | + } |
|
249 | 249 | |
250 | 250 | |
251 | 251 | } |
@@ -12,58 +12,58 @@ |
||
12 | 12 | */ |
13 | 13 | class UserLogs |
14 | 14 | { |
15 | - /** |
|
16 | - * @var integer |
|
17 | - * |
|
18 | - * @ORM\Column(name="id", type="integer", nullable=false) |
|
19 | - * @ORM\Id |
|
20 | - * @ORM\GeneratedValue(strategy="NONE") |
|
21 | - */ |
|
22 | - private $id; |
|
15 | + /** |
|
16 | + * @var integer |
|
17 | + * |
|
18 | + * @ORM\Column(name="id", type="integer", nullable=false) |
|
19 | + * @ORM\Id |
|
20 | + * @ORM\GeneratedValue(strategy="NONE") |
|
21 | + */ |
|
22 | + private $id; |
|
23 | 23 | |
24 | - /** |
|
25 | - * @var \User |
|
26 | - * |
|
27 | - * @ORM\Id |
|
28 | - * @ORM\GeneratedValue(strategy="NONE") |
|
29 | - * @ORM\OneToOne(targetEntity="User") |
|
30 | - * @ORM\JoinColumns({ |
|
31 | - * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
|
32 | - * }) |
|
33 | - */ |
|
34 | - private $user; |
|
24 | + /** |
|
25 | + * @var \User |
|
26 | + * |
|
27 | + * @ORM\Id |
|
28 | + * @ORM\GeneratedValue(strategy="NONE") |
|
29 | + * @ORM\OneToOne(targetEntity="User") |
|
30 | + * @ORM\JoinColumns({ |
|
31 | + * @ORM\JoinColumn(name="user_id", referencedColumnName="id") |
|
32 | + * }) |
|
33 | + */ |
|
34 | + private $user; |
|
35 | 35 | |
36 | - /** |
|
37 | - * @return int |
|
38 | - */ |
|
39 | - public function getId() |
|
40 | - { |
|
41 | - return $this->id; |
|
42 | - } |
|
36 | + /** |
|
37 | + * @return int |
|
38 | + */ |
|
39 | + public function getId() |
|
40 | + { |
|
41 | + return $this->id; |
|
42 | + } |
|
43 | 43 | |
44 | - /** |
|
45 | - * @param int $id |
|
46 | - */ |
|
47 | - public function setId($id) |
|
48 | - { |
|
49 | - $this->id = $id; |
|
50 | - } |
|
44 | + /** |
|
45 | + * @param int $id |
|
46 | + */ |
|
47 | + public function setId($id) |
|
48 | + { |
|
49 | + $this->id = $id; |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * @return \User |
|
54 | - */ |
|
55 | - public function getUser() |
|
56 | - { |
|
57 | - return $this->user; |
|
58 | - } |
|
52 | + /** |
|
53 | + * @return \User |
|
54 | + */ |
|
55 | + public function getUser() |
|
56 | + { |
|
57 | + return $this->user; |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @param \User $user |
|
62 | - */ |
|
63 | - public function setUser($user) |
|
64 | - { |
|
65 | - $this->user = $user; |
|
66 | - } |
|
60 | + /** |
|
61 | + * @param \User $user |
|
62 | + */ |
|
63 | + public function setUser($user) |
|
64 | + { |
|
65 | + $this->user = $user; |
|
66 | + } |
|
67 | 67 | |
68 | 68 | |
69 | 69 | } |
@@ -12,18 +12,18 @@ |
||
12 | 12 | */ |
13 | 13 | class Configuration implements ConfigurationInterface |
14 | 14 | { |
15 | - /** |
|
16 | - * {@inheritdoc} |
|
17 | - */ |
|
18 | - public function getConfigTreeBuilder() |
|
19 | - { |
|
20 | - $treeBuilder = new TreeBuilder(); |
|
21 | - $rootNode = $treeBuilder->root('ribs_admin'); |
|
15 | + /** |
|
16 | + * {@inheritdoc} |
|
17 | + */ |
|
18 | + public function getConfigTreeBuilder() |
|
19 | + { |
|
20 | + $treeBuilder = new TreeBuilder(); |
|
21 | + $rootNode = $treeBuilder->root('ribs_admin'); |
|
22 | 22 | |
23 | - // Here you should define the parameters that are allowed to |
|
24 | - // configure your bundle. See the documentation linked above for |
|
25 | - // more information on that topic. |
|
23 | + // Here you should define the parameters that are allowed to |
|
24 | + // configure your bundle. See the documentation linked above for |
|
25 | + // more information on that topic. |
|
26 | 26 | |
27 | - return $treeBuilder; |
|
28 | - } |
|
27 | + return $treeBuilder; |
|
28 | + } |
|
29 | 29 | } |
@@ -14,15 +14,15 @@ |
||
14 | 14 | */ |
15 | 15 | class RibsAdminExtension extends Extension |
16 | 16 | { |
17 | - /** |
|
18 | - * {@inheritdoc} |
|
19 | - */ |
|
20 | - public function load(array $configs, ContainerBuilder $container) |
|
21 | - { |
|
22 | - $configuration = new Configuration(); |
|
23 | - $config = $this->processConfiguration($configuration, $configs); |
|
17 | + /** |
|
18 | + * {@inheritdoc} |
|
19 | + */ |
|
20 | + public function load(array $configs, ContainerBuilder $container) |
|
21 | + { |
|
22 | + $configuration = new Configuration(); |
|
23 | + $config = $this->processConfiguration($configuration, $configs); |
|
24 | 24 | |
25 | - $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
26 | - $loader->load('services.yml'); |
|
27 | - } |
|
25 | + $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
26 | + $loader->load('services.yml'); |
|
27 | + } |
|
28 | 28 | } |
@@ -6,12 +6,12 @@ |
||
6 | 6 | |
7 | 7 | class DefaultControllerTest extends WebTestCase |
8 | 8 | { |
9 | - public function testIndex() |
|
10 | - { |
|
11 | - $client = static::createClient(); |
|
9 | + public function testIndex() |
|
10 | + { |
|
11 | + $client = static::createClient(); |
|
12 | 12 | |
13 | - $crawler = $client->request('GET', '/'); |
|
13 | + $crawler = $client->request('GET', '/'); |
|
14 | 14 | |
15 | - $this->assertContains('Hello World', $client->getResponse()->getContent()); |
|
16 | - } |
|
15 | + $this->assertContains('Hello World', $client->getResponse()->getContent()); |
|
16 | + } |
|
17 | 17 | } |
@@ -7,16 +7,16 @@ |
||
7 | 7 | |
8 | 8 | class DefaultController extends Controller |
9 | 9 | { |
10 | - /** |
|
11 | - * @Route("/index", name="ribsadmin_index") |
|
12 | - * @Route("/accounts", name="ribsadmin_accounts") |
|
13 | - * @Route("/access-rights-management", name="ribsadmin_access_rights") |
|
14 | - * @Route("/contents", name="ribsadmin_contents") |
|
15 | - * @Route("/navigation", name="ribsadmin_navigation") |
|
16 | - * |
|
17 | - */ |
|
18 | - public function indexAction() |
|
19 | - { |
|
20 | - return $this->render('RibsAdminBundle:Default:index.html.twig'); |
|
21 | - } |
|
10 | + /** |
|
11 | + * @Route("/index", name="ribsadmin_index") |
|
12 | + * @Route("/accounts", name="ribsadmin_accounts") |
|
13 | + * @Route("/access-rights-management", name="ribsadmin_access_rights") |
|
14 | + * @Route("/contents", name="ribsadmin_contents") |
|
15 | + * @Route("/navigation", name="ribsadmin_navigation") |
|
16 | + * |
|
17 | + */ |
|
18 | + public function indexAction() |
|
19 | + { |
|
20 | + return $this->render('RibsAdminBundle:Default:index.html.twig'); |
|
21 | + } |
|
22 | 22 | } |
@@ -10,114 +10,114 @@ |
||
10 | 10 | |
11 | 11 | class AccessRights |
12 | 12 | { |
13 | - private $em; |
|
14 | - private $router; |
|
15 | - private $session; |
|
16 | - private $request; |
|
17 | - |
|
18 | - /** |
|
19 | - * AccessRights constructor. |
|
20 | - * @param ContainerInterface $em |
|
21 | - * @param RouterInterface $router |
|
22 | - * @param Session $session |
|
23 | - * @param RequestStack $request |
|
24 | - */ |
|
25 | - public function __construct(ContainerInterface $em, RouterInterface $router, Session $session, RequestStack $request) |
|
26 | - { |
|
27 | - $this->em = $em; |
|
28 | - $this->router = $router; |
|
29 | - $this->session = $session; |
|
30 | - $this->request = $request; |
|
31 | - } |
|
32 | - |
|
33 | - public function onKernelController() |
|
34 | - { |
|
35 | - $route = $this->request->getCurrentRequest()->get("_route"); |
|
36 | - $admin_page = explode("_", $route)[0]; |
|
37 | - |
|
38 | - //comment because it cause errore redirect |
|
39 | - /*if ($route == "fos_user_security_login" || $route == "fos_user_registration_register") { |
|
13 | + private $em; |
|
14 | + private $router; |
|
15 | + private $session; |
|
16 | + private $request; |
|
17 | + |
|
18 | + /** |
|
19 | + * AccessRights constructor. |
|
20 | + * @param ContainerInterface $em |
|
21 | + * @param RouterInterface $router |
|
22 | + * @param Session $session |
|
23 | + * @param RequestStack $request |
|
24 | + */ |
|
25 | + public function __construct(ContainerInterface $em, RouterInterface $router, Session $session, RequestStack $request) |
|
26 | + { |
|
27 | + $this->em = $em; |
|
28 | + $this->router = $router; |
|
29 | + $this->session = $session; |
|
30 | + $this->request = $request; |
|
31 | + } |
|
32 | + |
|
33 | + public function onKernelController() |
|
34 | + { |
|
35 | + $route = $this->request->getCurrentRequest()->get("_route"); |
|
36 | + $admin_page = explode("_", $route)[0]; |
|
37 | + |
|
38 | + //comment because it cause errore redirect |
|
39 | + /*if ($route == "fos_user_security_login" || $route == "fos_user_registration_register") { |
|
40 | 40 | $this->session->clear(); |
41 | 41 | $this->em->get("security.token_storage")->setToken(null); |
42 | 42 | }*/ |
43 | 43 | |
44 | - //to show admin panel |
|
45 | - if (in_array($route, ["_profiler", "_profiler_search_bar", "_wdt"])) { |
|
46 | - return; |
|
47 | - } |
|
48 | - |
|
49 | - $ribs_admin_rights = json_decode(file_get_contents($this->em->get('kernel')->getRootDir() . "/../src/Ribs/RibsAdminBundle/Resources/json/ribsadmin_rights.json")); |
|
50 | - |
|
51 | - if ($admin_page == "ribsadmin" && ($route !== 404) && ($route !== null)) { |
|
52 | - $route_right = $this->in_array_recursive($route, $ribs_admin_rights); |
|
53 | - $user_rights = $this->getUserRights(); |
|
54 | - |
|
55 | - if ($route_right === false) { |
|
56 | - throw new AccessDeniedException("No access"); |
|
57 | - } |
|
58 | - |
|
59 | - foreach ($user_rights as $right) { |
|
60 | - if (in_array($right, $route_right)) { |
|
61 | - return; |
|
62 | - } |
|
63 | - } |
|
64 | - |
|
65 | - throw new AccessDeniedException("No access"); |
|
66 | - } |
|
67 | - } |
|
68 | - |
|
69 | - /** |
|
70 | - * @param $needle |
|
71 | - * @param $haystack |
|
72 | - * @return bool|mixed |
|
73 | - * fonction that search if the right contain an url or more |
|
74 | - */ |
|
75 | - private function in_array_recursive($needle, $haystack) |
|
76 | - { |
|
77 | - $rights = []; |
|
78 | - $it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($haystack)); |
|
79 | - |
|
80 | - foreach ($it AS $element => $value) { |
|
81 | - if ($value == $needle) { |
|
82 | - $rights[] = $it->getInnerIterator()["right"]; |
|
83 | - } |
|
84 | - } |
|
85 | - |
|
86 | - if (count($rights) === 0) { |
|
87 | - return false; |
|
88 | - } |
|
89 | - |
|
90 | - return $rights; |
|
91 | - } |
|
92 | - |
|
93 | - |
|
94 | - /** |
|
95 | - * @return array function that retun a array that contain all user rights or empty array if no right found |
|
96 | - */ |
|
97 | - private function getUserRights(): array |
|
98 | - { |
|
99 | - $user_rights = $this->em->get("security.token_storage")->getToken()->getUser()->getUser()->getAccessRights(); |
|
100 | - |
|
101 | - if ($user_rights) { |
|
102 | - return explode(",", $user_rights); |
|
103 | - } |
|
104 | - |
|
105 | - return [""]; |
|
106 | - } |
|
107 | - |
|
108 | - /** |
|
109 | - * @param string $right |
|
110 | - * @return bool |
|
111 | - * function that allow to test a right directly in the view |
|
112 | - */ |
|
113 | - public function testRight(string $right): bool |
|
114 | - { |
|
115 | - $user_rights = $this->getUserRights(); |
|
116 | - |
|
117 | - if (in_array($right, $user_rights)) { |
|
118 | - return true; |
|
119 | - } |
|
120 | - |
|
121 | - return false; |
|
122 | - } |
|
44 | + //to show admin panel |
|
45 | + if (in_array($route, ["_profiler", "_profiler_search_bar", "_wdt"])) { |
|
46 | + return; |
|
47 | + } |
|
48 | + |
|
49 | + $ribs_admin_rights = json_decode(file_get_contents($this->em->get('kernel')->getRootDir() . "/../src/Ribs/RibsAdminBundle/Resources/json/ribsadmin_rights.json")); |
|
50 | + |
|
51 | + if ($admin_page == "ribsadmin" && ($route !== 404) && ($route !== null)) { |
|
52 | + $route_right = $this->in_array_recursive($route, $ribs_admin_rights); |
|
53 | + $user_rights = $this->getUserRights(); |
|
54 | + |
|
55 | + if ($route_right === false) { |
|
56 | + throw new AccessDeniedException("No access"); |
|
57 | + } |
|
58 | + |
|
59 | + foreach ($user_rights as $right) { |
|
60 | + if (in_array($right, $route_right)) { |
|
61 | + return; |
|
62 | + } |
|
63 | + } |
|
64 | + |
|
65 | + throw new AccessDeniedException("No access"); |
|
66 | + } |
|
67 | + } |
|
68 | + |
|
69 | + /** |
|
70 | + * @param $needle |
|
71 | + * @param $haystack |
|
72 | + * @return bool|mixed |
|
73 | + * fonction that search if the right contain an url or more |
|
74 | + */ |
|
75 | + private function in_array_recursive($needle, $haystack) |
|
76 | + { |
|
77 | + $rights = []; |
|
78 | + $it = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($haystack)); |
|
79 | + |
|
80 | + foreach ($it AS $element => $value) { |
|
81 | + if ($value == $needle) { |
|
82 | + $rights[] = $it->getInnerIterator()["right"]; |
|
83 | + } |
|
84 | + } |
|
85 | + |
|
86 | + if (count($rights) === 0) { |
|
87 | + return false; |
|
88 | + } |
|
89 | + |
|
90 | + return $rights; |
|
91 | + } |
|
92 | + |
|
93 | + |
|
94 | + /** |
|
95 | + * @return array function that retun a array that contain all user rights or empty array if no right found |
|
96 | + */ |
|
97 | + private function getUserRights(): array |
|
98 | + { |
|
99 | + $user_rights = $this->em->get("security.token_storage")->getToken()->getUser()->getUser()->getAccessRights(); |
|
100 | + |
|
101 | + if ($user_rights) { |
|
102 | + return explode(",", $user_rights); |
|
103 | + } |
|
104 | + |
|
105 | + return [""]; |
|
106 | + } |
|
107 | + |
|
108 | + /** |
|
109 | + * @param string $right |
|
110 | + * @return bool |
|
111 | + * function that allow to test a right directly in the view |
|
112 | + */ |
|
113 | + public function testRight(string $right): bool |
|
114 | + { |
|
115 | + $user_rights = $this->getUserRights(); |
|
116 | + |
|
117 | + if (in_array($right, $user_rights)) { |
|
118 | + return true; |
|
119 | + } |
|
120 | + |
|
121 | + return false; |
|
122 | + } |
|
123 | 123 | } |
124 | 124 | \ No newline at end of file |