@@ -29,25 +29,25 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function indexAction() |
| 31 | 31 | { |
| 32 | - if( $this->has( 'security.authorization_checker' ) && $this->get( 'security.token_storage' )->getToken() |
|
| 33 | - && $this->get( 'security.authorization_checker' )->isGranted( 'ROLE_ADMIN' ) |
|
| 34 | - || $this->has( 'security.context' ) && $this->get( 'security.context' )->getToken() |
|
| 35 | - && $this->get( 'security.context' )->isGranted( 'ROLE_ADMIN' ) |
|
| 32 | + if ($this->has('security.authorization_checker') && $this->get('security.token_storage')->getToken() |
|
| 33 | + && $this->get('security.authorization_checker')->isGranted('ROLE_ADMIN') |
|
| 34 | + || $this->has('security.context') && $this->get('security.context')->getToken() |
|
| 35 | + && $this->get('security.context')->isGranted('ROLE_ADMIN') |
|
| 36 | 36 | ) { |
| 37 | - $params = array( 'site' => 'default', 'resource' => 'product', 'lang' => 'en' ); |
|
| 38 | - return $this->redirect( $this->generateUrl( 'aimeos_shop_jqadm_search', $params ) ); |
|
| 37 | + $params = array('site' => 'default', 'resource' => 'product', 'lang' => 'en'); |
|
| 38 | + return $this->redirect($this->generateUrl('aimeos_shop_jqadm_search', $params)); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | $param = array(); |
| 42 | 42 | |
| 43 | - if( $this->get( 'security.authentication_utils' ) ) |
|
| 43 | + if ($this->get('security.authentication_utils')) |
|
| 44 | 44 | { |
| 45 | - $auth = $this->get( 'security.authentication_utils' ); |
|
| 45 | + $auth = $this->get('security.authentication_utils'); |
|
| 46 | 46 | |
| 47 | 47 | $param['error'] = $auth->getLastAuthenticationError(); |
| 48 | 48 | $param['username'] = $auth->getLastUsername(); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - return $this->render( 'AimeosShopBundle:Admin:index.html.twig', $param ); |
|
| 51 | + return $this->render('AimeosShopBundle:Admin:index.html.twig', $param); |
|
| 52 | 52 | } |
| 53 | 53 | } |