@@ -153,23 +153,23 @@ |
||
153 | 153 | */ |
154 | 154 | private function getGroup($name) { |
155 | 155 | switch ($name) { |
156 | - case 'guest': |
|
157 | - if ($this->guestGroup === null) { |
|
158 | - $this->guestGroup = GroupQuery::create()->filterByIsGuest(true)->findOne(); |
|
159 | - } |
|
160 | - return $this->guestGroup; |
|
161 | - |
|
162 | - case 'user': |
|
163 | - if ($this->userGroup === null) { |
|
164 | - $this->userGroup = GroupQuery::create()->filterByIsDefault(true)->findOne(); |
|
165 | - } |
|
166 | - return $this->userGroup; |
|
167 | - |
|
168 | - case 'admin': |
|
169 | - if ($this->adminGroup === null) { |
|
170 | - $this->adminGroup = GroupQuery::create()->findOneById(3); |
|
171 | - } |
|
172 | - return $this->adminGroup; |
|
156 | + case 'guest': |
|
157 | + if ($this->guestGroup === null) { |
|
158 | + $this->guestGroup = GroupQuery::create()->filterByIsGuest(true)->findOne(); |
|
159 | + } |
|
160 | + return $this->guestGroup; |
|
161 | + |
|
162 | + case 'user': |
|
163 | + if ($this->userGroup === null) { |
|
164 | + $this->userGroup = GroupQuery::create()->filterByIsDefault(true)->findOne(); |
|
165 | + } |
|
166 | + return $this->userGroup; |
|
167 | + |
|
168 | + case 'admin': |
|
169 | + if ($this->adminGroup === null) { |
|
170 | + $this->adminGroup = GroupQuery::create()->findOneById(3); |
|
171 | + } |
|
172 | + return $this->adminGroup; |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 |
@@ -196,7 +196,7 @@ |
||
196 | 196 | |
197 | 197 | // firewall |
198 | 198 | $firewall = $this->getServiceContainer()->getFirewall(); |
199 | - $this->twig->addFunction(new Twig_SimpleFunction('hasPermission', function ($module, $action) use ($firewall) { |
|
199 | + $this->twig->addFunction(new Twig_SimpleFunction('hasPermission', function($module, $action) use ($firewall) { |
|
200 | 200 | return $firewall->hasPermission($module, $action); |
201 | 201 | })); |
202 | 202 | } |
@@ -238,23 +238,23 @@ |
||
238 | 238 | */ |
239 | 239 | private function getGroup($name) { |
240 | 240 | switch ($name) { |
241 | - case 'guest': |
|
242 | - if ($this->guestGroup === null) { |
|
243 | - $this->guestGroup = GroupQuery::create()->filterByIsGuest(true)->findOne(); |
|
244 | - } |
|
245 | - return $this->guestGroup; |
|
241 | + case 'guest': |
|
242 | + if ($this->guestGroup === null) { |
|
243 | + $this->guestGroup = GroupQuery::create()->filterByIsGuest(true)->findOne(); |
|
244 | + } |
|
245 | + return $this->guestGroup; |
|
246 | 246 | |
247 | - case 'user': |
|
248 | - if ($this->userGroup === null) { |
|
249 | - $this->userGroup = GroupQuery::create()->filterByIsDefault(true)->findOne(); |
|
250 | - } |
|
251 | - return $this->userGroup; |
|
247 | + case 'user': |
|
248 | + if ($this->userGroup === null) { |
|
249 | + $this->userGroup = GroupQuery::create()->filterByIsDefault(true)->findOne(); |
|
250 | + } |
|
251 | + return $this->userGroup; |
|
252 | 252 | |
253 | - case 'admin': |
|
254 | - if ($this->adminGroup === null) { |
|
255 | - $this->adminGroup = GroupQuery::create()->findOneById(3); |
|
256 | - } |
|
257 | - return $this->adminGroup; |
|
253 | + case 'admin': |
|
254 | + if ($this->adminGroup === null) { |
|
255 | + $this->adminGroup = GroupQuery::create()->findOneById(3); |
|
256 | + } |
|
257 | + return $this->adminGroup; |
|
258 | 258 | } |
259 | 259 | } |
260 | 260 |