@@ -40,7 +40,7 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * List users |
| 42 | 42 | * |
| 43 | - * @return \Zend\Http\Response|ViewModel |
|
| 43 | + * @return \Core\Controller\Plugin\CreatePaginator |
|
| 44 | 44 | */ |
| 45 | 45 | public function listAction() |
| 46 | 46 | { |
@@ -80,10 +80,10 @@ |
||
| 80 | 80 | |
| 81 | 81 | if (isset($this->value['location']->coordinates)) { |
| 82 | 82 | $coordinates = $this->value['location']->coordinates->getCoordinates(); |
| 83 | - $queryBuilder->field('locations.coordinates')->geoWithinCenter($coordinates[0], $coordinates[1], (float) $this->value['d']/100); |
|
| 83 | + $queryBuilder->field('locations.coordinates')->geoWithinCenter($coordinates[0], $coordinates[1], (float) $this->value['d'] / 100); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - if (isset($params['channel']) && !empty($params['channel']) && $params['channel']!="default" ){ |
|
| 86 | + if (isset($params['channel']) && !empty($params['channel']) && $params['channel'] != "default") { |
|
| 87 | 87 | $queryBuilder->field('portals')->equals($params['channel']); |
| 88 | 88 | } |
| 89 | 89 | |
@@ -30,12 +30,12 @@ |
||
| 30 | 30 | public function listAction() |
| 31 | 31 | { |
| 32 | 32 | |
| 33 | - $channel = $this->params()->fromRoute('channel','default'); |
|
| 33 | + $channel = $this->params()->fromRoute('channel', 'default'); |
|
| 34 | 34 | |
| 35 | 35 | /* @var Paginator $paginator */ |
| 36 | - $paginator = $this->paginator('Jobs/Job', ['channel' => $channel ]); |
|
| 36 | + $paginator = $this->paginator('Jobs/Job', ['channel' => $channel]); |
|
| 37 | 37 | |
| 38 | - $viewModel=new ViewModel(); |
|
| 38 | + $viewModel = new ViewModel(); |
|
| 39 | 39 | $viewModel->setVariables( |
| 40 | 40 | [ |
| 41 | 41 | 'jobs' => $paginator, |
@@ -73,8 +73,8 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | public function injectXmlTemplate(MvcEvent $e) |
| 75 | 75 | { |
| 76 | - $format = $e->getRouteMatch()->getParam('format',"html"); |
|
| 77 | - $channel = $e->getRouteMatch()->getParam('channel',"default"); |
|
| 76 | + $format = $e->getRouteMatch()->getParam('format', "html"); |
|
| 77 | + $channel = $e->getRouteMatch()->getParam('channel', "default"); |
|
| 78 | 78 | |
| 79 | 79 | if ('xml' == $format) { |
| 80 | 80 | $viewModel = $e->getResult(); |
@@ -83,8 +83,8 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | $resolver = $e->getApplication()->getServiceManager()->get('ViewResolver'); |
| 85 | 85 | |
| 86 | - $templateDefault = $viewModel->getTemplate() . '.xml.phtml'; |
|
| 87 | - $templateChannel = $viewModel->getTemplate() . '.' . $channel . '.xml.phtml'; |
|
| 86 | + $templateDefault = $viewModel->getTemplate().'.xml.phtml'; |
|
| 87 | + $templateChannel = $viewModel->getTemplate().'.'.$channel.'.xml.phtml'; |
|
| 88 | 88 | |
| 89 | 89 | |
| 90 | 90 | if ($channel != 'default' && $resolver->resolve($templateChannel)) { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | /* @var Response $response */ |
| 103 | 103 | $response = $e->getResponse(); |
| 104 | - $response->getHeaders()->addHeaderLine('Content-Type','application/xml'); |
|
| 104 | + $response->getHeaders()->addHeaderLine('Content-Type', 'application/xml'); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | } |