@@ -8,13 +8,11 @@ |
||
8 | 8 | use Symfony\Component\HttpFoundation\Request; |
9 | 9 | use Symfony\Component\Routing\Annotation\Route; |
10 | 10 | |
11 | -class RegistrationController extends Controller |
|
12 | -{ |
|
11 | +class RegistrationController extends Controller { |
|
13 | 12 | /** |
14 | 13 | * @Route("/register/", name="ribsadmin_register") |
15 | 14 | */ |
16 | - public function registerAction(Request $request) |
|
17 | - { |
|
15 | + public function registerAction(Request $request) { |
|
18 | 16 | // 1) build the form |
19 | 17 | $passwordEncoder = $this->get("security.password_encoder"); |
20 | 18 | $user = new Account(); |
@@ -14,49 +14,49 @@ discard block |
||
14 | 14 | */ |
15 | 15 | class Page |
16 | 16 | { |
17 | - /** |
|
18 | - * @var integer |
|
19 | - * |
|
20 | - * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
21 | - * @ORM\Id |
|
22 | - * @ORM\GeneratedValue(strategy="IDENTITY") |
|
23 | - */ |
|
24 | - private $id; |
|
25 | - |
|
26 | - /** |
|
27 | - * @var string |
|
28 | - * |
|
29 | - * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
30 | - */ |
|
31 | - private $guid; |
|
32 | - |
|
33 | - /** |
|
34 | - * @var string |
|
35 | - * |
|
36 | - * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
37 | - */ |
|
38 | - private $titleTag; |
|
39 | - |
|
40 | - /** |
|
41 | - * @var string |
|
42 | - * |
|
43 | - * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
44 | - */ |
|
45 | - private $descriptionTag; |
|
46 | - |
|
47 | - /** |
|
48 | - * @var string |
|
49 | - * |
|
50 | - * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
51 | - */ |
|
52 | - private $title; |
|
17 | + /** |
|
18 | + * @var integer |
|
19 | + * |
|
20 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"unsigned"=true}) |
|
21 | + * @ORM\Id |
|
22 | + * @ORM\GeneratedValue(strategy="IDENTITY") |
|
23 | + */ |
|
24 | + private $id; |
|
25 | + |
|
26 | + /** |
|
27 | + * @var string |
|
28 | + * |
|
29 | + * @ORM\Column(name="guid", type="string", length=255, nullable=false) |
|
30 | + */ |
|
31 | + private $guid; |
|
32 | + |
|
33 | + /** |
|
34 | + * @var string |
|
35 | + * |
|
36 | + * @ORM\Column(name="title_tag", type="string", length=70, nullable=true) |
|
37 | + */ |
|
38 | + private $titleTag; |
|
39 | + |
|
40 | + /** |
|
41 | + * @var string |
|
42 | + * |
|
43 | + * @ORM\Column(name="description_tag", type="string", length=160, nullable=true) |
|
44 | + */ |
|
45 | + private $descriptionTag; |
|
46 | + |
|
47 | + /** |
|
48 | + * @var string |
|
49 | + * |
|
50 | + * @ORM\Column(name="title", type="string", length=255, nullable=false) |
|
51 | + */ |
|
52 | + private $title; |
|
53 | 53 | |
54 | 54 | /** |
55 | 55 | * @var string |
56 | 56 | * |
57 | 57 | * @ORM\Column(name="template", type="string", length=255, nullable=false) |
58 | 58 | */ |
59 | - private $template; |
|
59 | + private $template; |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @var string |
@@ -65,43 +65,43 @@ discard block |
||
65 | 65 | */ |
66 | 66 | private $url; |
67 | 67 | |
68 | - /** |
|
69 | - * @var string |
|
70 | - * |
|
71 | - * @ORM\Column(name="content", type="text", nullable=true) |
|
72 | - */ |
|
73 | - private $content; |
|
74 | - |
|
75 | - /** |
|
76 | - * @var integer |
|
77 | - * |
|
78 | - * @ORM\Column(name="active", type="integer", nullable=false) |
|
79 | - */ |
|
80 | - private $active; |
|
81 | - |
|
82 | - /** |
|
83 | - * @var integer |
|
84 | - * |
|
85 | - * @ORM\Column(name="order", type="integer", nullable=false) |
|
86 | - */ |
|
87 | - private $order; |
|
88 | - |
|
89 | - /** |
|
90 | - * @var integer |
|
91 | - * |
|
92 | - * @ORM\Column(name="displayed", type="integer", nullable=false) |
|
93 | - */ |
|
94 | - private $displayed; |
|
95 | - |
|
96 | - /** |
|
97 | - * @var \Page |
|
98 | - * |
|
99 | - * @ORM\ManyToOne(targetEntity="Page") |
|
100 | - * @ORM\JoinColumns({ |
|
101 | - * @ORM\JoinColumn(name="parent", referencedColumnName="id") |
|
102 | - * }) |
|
103 | - */ |
|
104 | - private $parent; |
|
68 | + /** |
|
69 | + * @var string |
|
70 | + * |
|
71 | + * @ORM\Column(name="content", type="text", nullable=true) |
|
72 | + */ |
|
73 | + private $content; |
|
74 | + |
|
75 | + /** |
|
76 | + * @var integer |
|
77 | + * |
|
78 | + * @ORM\Column(name="active", type="integer", nullable=false) |
|
79 | + */ |
|
80 | + private $active; |
|
81 | + |
|
82 | + /** |
|
83 | + * @var integer |
|
84 | + * |
|
85 | + * @ORM\Column(name="order", type="integer", nullable=false) |
|
86 | + */ |
|
87 | + private $order; |
|
88 | + |
|
89 | + /** |
|
90 | + * @var integer |
|
91 | + * |
|
92 | + * @ORM\Column(name="displayed", type="integer", nullable=false) |
|
93 | + */ |
|
94 | + private $displayed; |
|
95 | + |
|
96 | + /** |
|
97 | + * @var \Page |
|
98 | + * |
|
99 | + * @ORM\ManyToOne(targetEntity="Page") |
|
100 | + * @ORM\JoinColumns({ |
|
101 | + * @ORM\JoinColumn(name="parent", referencedColumnName="id") |
|
102 | + * }) |
|
103 | + */ |
|
104 | + private $parent; |
|
105 | 105 | |
106 | 106 | /** |
107 | 107 | * @var \DateTime |
@@ -119,85 +119,85 @@ discard block |
||
119 | 119 | */ |
120 | 120 | private $updateDate; |
121 | 121 | |
122 | - /** |
|
123 | - * @return int |
|
124 | - */ |
|
125 | - public function getId() |
|
126 | - { |
|
127 | - return $this->id; |
|
128 | - } |
|
129 | - |
|
130 | - /** |
|
131 | - * @param int $id |
|
132 | - */ |
|
133 | - public function setId($id) |
|
134 | - { |
|
135 | - $this->id = $id; |
|
136 | - } |
|
137 | - |
|
138 | - /** |
|
139 | - * @return string |
|
140 | - */ |
|
141 | - public function getGuid() |
|
142 | - { |
|
143 | - return $this->guid; |
|
144 | - } |
|
145 | - |
|
146 | - /** |
|
147 | - * @param string $guid |
|
148 | - */ |
|
149 | - public function setGuid($guid) |
|
150 | - { |
|
151 | - $this->guid = $guid; |
|
152 | - } |
|
153 | - |
|
154 | - /** |
|
155 | - * @return string |
|
156 | - */ |
|
157 | - public function getTitleTag() |
|
158 | - { |
|
159 | - return $this->titleTag; |
|
160 | - } |
|
161 | - |
|
162 | - /** |
|
163 | - * @param string $titleTag |
|
164 | - */ |
|
165 | - public function setTitleTag($titleTag) |
|
166 | - { |
|
167 | - $this->titleTag = $titleTag; |
|
168 | - } |
|
169 | - |
|
170 | - /** |
|
171 | - * @return string |
|
172 | - */ |
|
173 | - public function getDescriptionTag() |
|
174 | - { |
|
175 | - return $this->descriptionTag; |
|
176 | - } |
|
177 | - |
|
178 | - /** |
|
179 | - * @param string $descriptionTag |
|
180 | - */ |
|
181 | - public function setDescriptionTag($descriptionTag) |
|
182 | - { |
|
183 | - $this->descriptionTag = $descriptionTag; |
|
184 | - } |
|
185 | - |
|
186 | - /** |
|
187 | - * @return string |
|
188 | - */ |
|
189 | - public function getTitle() |
|
190 | - { |
|
191 | - return $this->title; |
|
192 | - } |
|
193 | - |
|
194 | - /** |
|
195 | - * @param string $title |
|
196 | - */ |
|
197 | - public function setTitle($title) |
|
198 | - { |
|
199 | - $this->title = $title; |
|
200 | - } |
|
122 | + /** |
|
123 | + * @return int |
|
124 | + */ |
|
125 | + public function getId() |
|
126 | + { |
|
127 | + return $this->id; |
|
128 | + } |
|
129 | + |
|
130 | + /** |
|
131 | + * @param int $id |
|
132 | + */ |
|
133 | + public function setId($id) |
|
134 | + { |
|
135 | + $this->id = $id; |
|
136 | + } |
|
137 | + |
|
138 | + /** |
|
139 | + * @return string |
|
140 | + */ |
|
141 | + public function getGuid() |
|
142 | + { |
|
143 | + return $this->guid; |
|
144 | + } |
|
145 | + |
|
146 | + /** |
|
147 | + * @param string $guid |
|
148 | + */ |
|
149 | + public function setGuid($guid) |
|
150 | + { |
|
151 | + $this->guid = $guid; |
|
152 | + } |
|
153 | + |
|
154 | + /** |
|
155 | + * @return string |
|
156 | + */ |
|
157 | + public function getTitleTag() |
|
158 | + { |
|
159 | + return $this->titleTag; |
|
160 | + } |
|
161 | + |
|
162 | + /** |
|
163 | + * @param string $titleTag |
|
164 | + */ |
|
165 | + public function setTitleTag($titleTag) |
|
166 | + { |
|
167 | + $this->titleTag = $titleTag; |
|
168 | + } |
|
169 | + |
|
170 | + /** |
|
171 | + * @return string |
|
172 | + */ |
|
173 | + public function getDescriptionTag() |
|
174 | + { |
|
175 | + return $this->descriptionTag; |
|
176 | + } |
|
177 | + |
|
178 | + /** |
|
179 | + * @param string $descriptionTag |
|
180 | + */ |
|
181 | + public function setDescriptionTag($descriptionTag) |
|
182 | + { |
|
183 | + $this->descriptionTag = $descriptionTag; |
|
184 | + } |
|
185 | + |
|
186 | + /** |
|
187 | + * @return string |
|
188 | + */ |
|
189 | + public function getTitle() |
|
190 | + { |
|
191 | + return $this->title; |
|
192 | + } |
|
193 | + |
|
194 | + /** |
|
195 | + * @param string $title |
|
196 | + */ |
|
197 | + public function setTitle($title) |
|
198 | + { |
|
199 | + $this->title = $title; |
|
200 | + } |
|
201 | 201 | |
202 | 202 | /** |
203 | 203 | * @return string |
@@ -231,85 +231,85 @@ discard block |
||
231 | 231 | $this->url = $url; |
232 | 232 | } |
233 | 233 | |
234 | - /** |
|
235 | - * @return string |
|
236 | - */ |
|
237 | - public function getContent() |
|
238 | - { |
|
239 | - return $this->content; |
|
240 | - } |
|
241 | - |
|
242 | - /** |
|
243 | - * @param string $content |
|
244 | - */ |
|
245 | - public function setContent($content) |
|
246 | - { |
|
247 | - $this->content = $content; |
|
248 | - } |
|
249 | - |
|
250 | - /** |
|
251 | - * @return int |
|
252 | - */ |
|
253 | - public function getActive() |
|
254 | - { |
|
255 | - return $this->active; |
|
256 | - } |
|
257 | - |
|
258 | - /** |
|
259 | - * @param int $active |
|
260 | - */ |
|
261 | - public function setActive($active) |
|
262 | - { |
|
263 | - $this->active = $active; |
|
264 | - } |
|
265 | - |
|
266 | - /** |
|
267 | - * @return int |
|
268 | - */ |
|
269 | - public function getOrder() |
|
270 | - { |
|
271 | - return $this->order; |
|
272 | - } |
|
273 | - |
|
274 | - /** |
|
275 | - * @param int $order |
|
276 | - */ |
|
277 | - public function setOrder($order) |
|
278 | - { |
|
279 | - $this->order = $order; |
|
280 | - } |
|
281 | - |
|
282 | - /** |
|
283 | - * @return int |
|
284 | - */ |
|
285 | - public function getDisplayed() |
|
286 | - { |
|
287 | - return $this->displayed; |
|
288 | - } |
|
289 | - |
|
290 | - /** |
|
291 | - * @param int $displayed |
|
292 | - */ |
|
293 | - public function setDisplayed($displayed) |
|
294 | - { |
|
295 | - $this->displayed = $displayed; |
|
296 | - } |
|
297 | - |
|
298 | - /** |
|
299 | - * @return \Page |
|
300 | - */ |
|
301 | - public function getParent() |
|
302 | - { |
|
303 | - return $this->parent; |
|
304 | - } |
|
305 | - |
|
306 | - /** |
|
307 | - * @param \Page $parent |
|
308 | - */ |
|
309 | - public function setParent($parent) |
|
310 | - { |
|
311 | - $this->parent = $parent; |
|
312 | - } |
|
234 | + /** |
|
235 | + * @return string |
|
236 | + */ |
|
237 | + public function getContent() |
|
238 | + { |
|
239 | + return $this->content; |
|
240 | + } |
|
241 | + |
|
242 | + /** |
|
243 | + * @param string $content |
|
244 | + */ |
|
245 | + public function setContent($content) |
|
246 | + { |
|
247 | + $this->content = $content; |
|
248 | + } |
|
249 | + |
|
250 | + /** |
|
251 | + * @return int |
|
252 | + */ |
|
253 | + public function getActive() |
|
254 | + { |
|
255 | + return $this->active; |
|
256 | + } |
|
257 | + |
|
258 | + /** |
|
259 | + * @param int $active |
|
260 | + */ |
|
261 | + public function setActive($active) |
|
262 | + { |
|
263 | + $this->active = $active; |
|
264 | + } |
|
265 | + |
|
266 | + /** |
|
267 | + * @return int |
|
268 | + */ |
|
269 | + public function getOrder() |
|
270 | + { |
|
271 | + return $this->order; |
|
272 | + } |
|
273 | + |
|
274 | + /** |
|
275 | + * @param int $order |
|
276 | + */ |
|
277 | + public function setOrder($order) |
|
278 | + { |
|
279 | + $this->order = $order; |
|
280 | + } |
|
281 | + |
|
282 | + /** |
|
283 | + * @return int |
|
284 | + */ |
|
285 | + public function getDisplayed() |
|
286 | + { |
|
287 | + return $this->displayed; |
|
288 | + } |
|
289 | + |
|
290 | + /** |
|
291 | + * @param int $displayed |
|
292 | + */ |
|
293 | + public function setDisplayed($displayed) |
|
294 | + { |
|
295 | + $this->displayed = $displayed; |
|
296 | + } |
|
297 | + |
|
298 | + /** |
|
299 | + * @return \Page |
|
300 | + */ |
|
301 | + public function getParent() |
|
302 | + { |
|
303 | + return $this->parent; |
|
304 | + } |
|
305 | + |
|
306 | + /** |
|
307 | + * @param \Page $parent |
|
308 | + */ |
|
309 | + public function setParent($parent) |
|
310 | + { |
|
311 | + $this->parent = $parent; |
|
312 | + } |
|
313 | 313 | |
314 | 314 | /** |
315 | 315 | * @return \DateTime |
@@ -12,8 +12,7 @@ discard block |
||
12 | 12 | * @ORM\Entity |
13 | 13 | * @ORM\EntityListeners({"Ribs\RibsAdminBundle\EventListener\GuidAwareListener"}) |
14 | 14 | */ |
15 | -class Page |
|
16 | -{ |
|
15 | +class Page { |
|
17 | 16 | /** |
18 | 17 | * @var integer |
19 | 18 | * |
@@ -122,192 +121,168 @@ discard block |
||
122 | 121 | /** |
123 | 122 | * @return int |
124 | 123 | */ |
125 | - public function getId() |
|
126 | - { |
|
124 | + public function getId() { |
|
127 | 125 | return $this->id; |
128 | 126 | } |
129 | 127 | |
130 | 128 | /** |
131 | 129 | * @param int $id |
132 | 130 | */ |
133 | - public function setId($id) |
|
134 | - { |
|
131 | + public function setId($id) { |
|
135 | 132 | $this->id = $id; |
136 | 133 | } |
137 | 134 | |
138 | 135 | /** |
139 | 136 | * @return string |
140 | 137 | */ |
141 | - public function getGuid() |
|
142 | - { |
|
138 | + public function getGuid() { |
|
143 | 139 | return $this->guid; |
144 | 140 | } |
145 | 141 | |
146 | 142 | /** |
147 | 143 | * @param string $guid |
148 | 144 | */ |
149 | - public function setGuid($guid) |
|
150 | - { |
|
145 | + public function setGuid($guid) { |
|
151 | 146 | $this->guid = $guid; |
152 | 147 | } |
153 | 148 | |
154 | 149 | /** |
155 | 150 | * @return string |
156 | 151 | */ |
157 | - public function getTitleTag() |
|
158 | - { |
|
152 | + public function getTitleTag() { |
|
159 | 153 | return $this->titleTag; |
160 | 154 | } |
161 | 155 | |
162 | 156 | /** |
163 | 157 | * @param string $titleTag |
164 | 158 | */ |
165 | - public function setTitleTag($titleTag) |
|
166 | - { |
|
159 | + public function setTitleTag($titleTag) { |
|
167 | 160 | $this->titleTag = $titleTag; |
168 | 161 | } |
169 | 162 | |
170 | 163 | /** |
171 | 164 | * @return string |
172 | 165 | */ |
173 | - public function getDescriptionTag() |
|
174 | - { |
|
166 | + public function getDescriptionTag() { |
|
175 | 167 | return $this->descriptionTag; |
176 | 168 | } |
177 | 169 | |
178 | 170 | /** |
179 | 171 | * @param string $descriptionTag |
180 | 172 | */ |
181 | - public function setDescriptionTag($descriptionTag) |
|
182 | - { |
|
173 | + public function setDescriptionTag($descriptionTag) { |
|
183 | 174 | $this->descriptionTag = $descriptionTag; |
184 | 175 | } |
185 | 176 | |
186 | 177 | /** |
187 | 178 | * @return string |
188 | 179 | */ |
189 | - public function getTitle() |
|
190 | - { |
|
180 | + public function getTitle() { |
|
191 | 181 | return $this->title; |
192 | 182 | } |
193 | 183 | |
194 | 184 | /** |
195 | 185 | * @param string $title |
196 | 186 | */ |
197 | - public function setTitle($title) |
|
198 | - { |
|
187 | + public function setTitle($title) { |
|
199 | 188 | $this->title = $title; |
200 | 189 | } |
201 | 190 | |
202 | 191 | /** |
203 | 192 | * @return string |
204 | 193 | */ |
205 | - public function getTemplate() |
|
206 | - { |
|
194 | + public function getTemplate() { |
|
207 | 195 | return $this->template; |
208 | 196 | } |
209 | 197 | |
210 | 198 | /** |
211 | 199 | * @param string $template |
212 | 200 | */ |
213 | - public function setTemplate($template) |
|
214 | - { |
|
201 | + public function setTemplate($template) { |
|
215 | 202 | $this->template = $template; |
216 | 203 | } |
217 | 204 | |
218 | 205 | /** |
219 | 206 | * @return string |
220 | 207 | */ |
221 | - public function getUrl() |
|
222 | - { |
|
208 | + public function getUrl() { |
|
223 | 209 | return $this->url; |
224 | 210 | } |
225 | 211 | |
226 | 212 | /** |
227 | 213 | * @param string $url |
228 | 214 | */ |
229 | - public function setUrl($url) |
|
230 | - { |
|
215 | + public function setUrl($url) { |
|
231 | 216 | $this->url = $url; |
232 | 217 | } |
233 | 218 | |
234 | 219 | /** |
235 | 220 | * @return string |
236 | 221 | */ |
237 | - public function getContent() |
|
238 | - { |
|
222 | + public function getContent() { |
|
239 | 223 | return $this->content; |
240 | 224 | } |
241 | 225 | |
242 | 226 | /** |
243 | 227 | * @param string $content |
244 | 228 | */ |
245 | - public function setContent($content) |
|
246 | - { |
|
229 | + public function setContent($content) { |
|
247 | 230 | $this->content = $content; |
248 | 231 | } |
249 | 232 | |
250 | 233 | /** |
251 | 234 | * @return int |
252 | 235 | */ |
253 | - public function getActive() |
|
254 | - { |
|
236 | + public function getActive() { |
|
255 | 237 | return $this->active; |
256 | 238 | } |
257 | 239 | |
258 | 240 | /** |
259 | 241 | * @param int $active |
260 | 242 | */ |
261 | - public function setActive($active) |
|
262 | - { |
|
243 | + public function setActive($active) { |
|
263 | 244 | $this->active = $active; |
264 | 245 | } |
265 | 246 | |
266 | 247 | /** |
267 | 248 | * @return int |
268 | 249 | */ |
269 | - public function getOrder() |
|
270 | - { |
|
250 | + public function getOrder() { |
|
271 | 251 | return $this->order; |
272 | 252 | } |
273 | 253 | |
274 | 254 | /** |
275 | 255 | * @param int $order |
276 | 256 | */ |
277 | - public function setOrder($order) |
|
278 | - { |
|
257 | + public function setOrder($order) { |
|
279 | 258 | $this->order = $order; |
280 | 259 | } |
281 | 260 | |
282 | 261 | /** |
283 | 262 | * @return int |
284 | 263 | */ |
285 | - public function getDisplayed() |
|
286 | - { |
|
264 | + public function getDisplayed() { |
|
287 | 265 | return $this->displayed; |
288 | 266 | } |
289 | 267 | |
290 | 268 | /** |
291 | 269 | * @param int $displayed |
292 | 270 | */ |
293 | - public function setDisplayed($displayed) |
|
294 | - { |
|
271 | + public function setDisplayed($displayed) { |
|
295 | 272 | $this->displayed = $displayed; |
296 | 273 | } |
297 | 274 | |
298 | 275 | /** |
299 | 276 | * @return \Page |
300 | 277 | */ |
301 | - public function getParent() |
|
302 | - { |
|
278 | + public function getParent() { |
|
303 | 279 | return $this->parent; |
304 | 280 | } |
305 | 281 | |
306 | 282 | /** |
307 | 283 | * @param \Page $parent |
308 | 284 | */ |
309 | - public function setParent($parent) |
|
310 | - { |
|
285 | + public function setParent($parent) { |
|
311 | 286 | $this->parent = $parent; |
312 | 287 | } |
313 | 288 | |
@@ -322,8 +297,7 @@ discard block |
||
322 | 297 | /** |
323 | 298 | * @param \DateTime $creationDate |
324 | 299 | */ |
325 | - public function setCreationDate(\DateTime $creationDate) |
|
326 | - { |
|
300 | + public function setCreationDate(\DateTime $creationDate) { |
|
327 | 301 | $this->creationDate = $creationDate; |
328 | 302 | } |
329 | 303 | |
@@ -338,8 +312,7 @@ discard block |
||
338 | 312 | /** |
339 | 313 | * @param \DateTime $updateDate |
340 | 314 | */ |
341 | - public function setUpdateDate(\DateTime $updateDate) |
|
342 | - { |
|
315 | + public function setUpdateDate(\DateTime $updateDate) { |
|
343 | 316 | $this->updateDate = $updateDate; |
344 | 317 | } |
345 | 318 | } |
@@ -7,8 +7,7 @@ |
||
7 | 7 | use Symfony\Component\HttpFoundation\Response; |
8 | 8 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
9 | 9 | |
10 | -class PageController extends Controller |
|
11 | -{ |
|
10 | +class PageController extends Controller { |
|
12 | 11 | /** |
13 | 12 | * @Route("/page/{url}", name="page", requirements={"url" = "[a-zA-Z0-9\-\_\/]*"}) |
14 | 13 | */ |