@@ -65,13 +65,13 @@ discard block |
||
| 65 | 65 | /* @var \Zend\View\Model\ViewModel $model */ |
| 66 | 66 | $model = $services->get('Jobs/viewModelTemplateFilter')->__invoke($job); |
| 67 | 67 | |
| 68 | - if ( false &&( |
|
| 68 | + if (false && ( |
|
| 69 | 69 | Status::ACTIVE == $job->getStatus() or |
| 70 | 70 | $job->getPermissions()->isGranted($user, PermissionsInterface::PERMISSION_VIEW) or |
| 71 | 71 | $this->auth()->isAdmin() |
| 72 | 72 | )) { |
| 73 | 73 | $applicationViewModel->setTemplate('iframe/iFrameInjection'); |
| 74 | - }elseif(Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
| 74 | + }elseif (Status::EXPIRED == $job->getStatus() or Status::INACTIVE == $job->getStatus()) { |
|
| 75 | 75 | $this->response->setStatusCode(Response::STATUS_CODE_410); |
| 76 | 76 | $model->setTemplate('jobs/error/expired'); |
| 77 | 77 | $model->setVariables( |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | protected function editTemplateAction() |
| 100 | 100 | { |
| 101 | 101 | $id = $this->params('id'); |
| 102 | - $formIdentifier=$this->params()->fromQuery('form'); |
|
| 102 | + $formIdentifier = $this->params()->fromQuery('form'); |
|
| 103 | 103 | $job = $this->jobRepository->find($id); |
| 104 | 104 | |
| 105 | 105 | /** @var \Zend\Http\Request $request */ |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | $instanceForm = $formTemplate->get($formIdentifier); |
| 131 | 131 | if (!isset($instanceForm)) { |
| 132 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
| 132 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | // the id is part of the postData, but it never should be altered |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | if (empty($user->info->email)) { |
| 173 | 173 | return $this->getErrorViewModel('no-parent', array('cause' => 'noEmail')); |
| 174 | 174 | } |
| 175 | - $userOrg = $user->getOrganization(); |
|
| 175 | + $userOrg = $user->getOrganization(); |
|
| 176 | 176 | if (!$userOrg->hasAssociation()) { |
| 177 | 177 | return $this->getErrorViewModel('no-parent', array('cause' => 'noCompany')); |
| 178 | 178 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | $jobEntity = $this->initializeJob()->get($this->params(), true); |
| 188 | 188 | |
| 189 | - $viewModel = null; |
|
| 189 | + $viewModel = null; |
|
| 190 | 190 | $this->acl($jobEntity, 'edit'); |
| 191 | 191 | if ($status = $params->fromQuery('status')) { |
| 192 | 192 | $this->changeStatus($jobEntity, $status); |
@@ -198,11 +198,11 @@ discard block |
||
| 198 | 198 | $instanceForm = null; |
| 199 | 199 | $formErrorMessages = array(); |
| 200 | 200 | |
| 201 | - if (isset($formIdentifier) && $request->isPost()) { |
|
| 201 | + if (isset($formIdentifier) && $request->isPost()) { |
|
| 202 | 202 | // at this point the form get instantiated and immediately accumulated |
| 203 | 203 | $instanceForm = $form->getForm($formIdentifier); |
| 204 | 204 | if (!isset($instanceForm)) { |
| 205 | - throw new \RuntimeException('No form found for "' . $formIdentifier . '"'); |
|
| 205 | + throw new \RuntimeException('No form found for "'.$formIdentifier.'"'); |
|
| 206 | 206 | } |
| 207 | 207 | // the id may be part of the postData, but it never should be altered |
| 208 | 208 | $postData = $request->getPost(); |
@@ -256,20 +256,20 @@ discard block |
||
| 256 | 256 | $jobValid = false; |
| 257 | 257 | $errorMessage[] = $this->translator->translate('Accept the Terms'); |
| 258 | 258 | } |
| 259 | - $result = $formEvents->trigger('ValidateJob', $this, [ 'form' => $form ]); |
|
| 259 | + $result = $formEvents->trigger('ValidateJob', $this, ['form' => $form]); |
|
| 260 | 260 | foreach ($result as $messages) { |
| 261 | 261 | if (!$messages) { |
| 262 | 262 | continue; |
| 263 | 263 | } |
| 264 | 264 | if (!is_array($messages)) { |
| 265 | - $messages = [ $messages ]; |
|
| 265 | + $messages = [$messages]; |
|
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | $errorMessage = array_merge($errorMessage, $messages); |
| 269 | 269 | $jobValid = false; |
| 270 | 270 | } |
| 271 | 271 | |
| 272 | - $errorMessage = '<br />' . implode('<br />', $errorMessage); |
|
| 272 | + $errorMessage = '<br />'.implode('<br />', $errorMessage); |
|
| 273 | 273 | if ($isAjax) { |
| 274 | 274 | if ($instanceForm instanceof SummaryForm) { |
| 275 | 275 | $instanceForm->setRenderMode(SummaryForm::RENDER_SUMMARY); |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | } else { |
| 278 | 278 | $viewHelper = 'form'; |
| 279 | 279 | } |
| 280 | - $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
| 280 | + $viewHelperManager = $serviceLocator->get('ViewHelperManager'); |
|
| 281 | 281 | $content = $viewHelperManager->get($viewHelper)->__invoke($instanceForm); |
| 282 | 282 | $viewModel = new JsonModel( |
| 283 | 283 | array( |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | } |
| 301 | 301 | } |
| 302 | 302 | } else { |
| 303 | - $formEvents->trigger('DisableElements', $this, [ 'form' => $form, 'job'=>$jobEntity ]); |
|
| 303 | + $formEvents->trigger('DisableElements', $this, ['form' => $form, 'job'=>$jobEntity]); |
|
| 304 | 304 | // Job is deployed, some changes are now disabled |
| 305 | 305 | $form->enableAll(); |
| 306 | 306 | } |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | |
| 309 | 309 | $completionLink = $this->url()->fromRoute( |
| 310 | 310 | 'lang/jobs/completion', |
| 311 | - [ 'id' => $jobEntity->getId()] |
|
| 311 | + ['id' => $jobEntity->getId()] |
|
| 312 | 312 | ); |
| 313 | 313 | |
| 314 | 314 | $viewModel = $this->getViewModel($form); |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | // array with differences between the last snapshot and the actual entity |
| 463 | 463 | // is remains Null if there is no snapshot |
| 464 | 464 | // it will be an empty array if the snapshot and the actual entity do not differ |
| 465 | - $diff = null; |
|
| 465 | + $diff = null; |
|
| 466 | 466 | // preliminary difference, contain all differences |
| 467 | 467 | $prelDiff = $this->entitySnapshot()->diff($jobEntity); |
| 468 | 468 | if (isset($prelDiff)) { |
@@ -500,21 +500,21 @@ discard block |
||
| 500 | 500 | 'lang/jobs/view', |
| 501 | 501 | array(), |
| 502 | 502 | array('query' => |
| 503 | - array( 'id' => $jobEntity->getId())) |
|
| 503 | + array('id' => $jobEntity->getId())) |
|
| 504 | 504 | ); |
| 505 | 505 | |
| 506 | 506 | $approvalLink = $this->url()->fromRoute( |
| 507 | 507 | 'lang/jobs/approval', |
| 508 | 508 | array('state' => 'approved'), |
| 509 | 509 | array('query' => |
| 510 | - array( 'id' => $jobEntity->getId())) |
|
| 510 | + array('id' => $jobEntity->getId())) |
|
| 511 | 511 | ); |
| 512 | 512 | |
| 513 | 513 | $declineLink = $this->url()->fromRoute( |
| 514 | 514 | 'lang/jobs/approval', |
| 515 | 515 | array('state' => 'declined'), |
| 516 | 516 | array('query' => |
| 517 | - array( 'id' => $jobEntity->getId())) |
|
| 517 | + array('id' => $jobEntity->getId())) |
|
| 518 | 518 | ); |
| 519 | 519 | |
| 520 | 520 | return array('job' => $jobEntity, |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | */ |
| 532 | 532 | public function deactivateAction() |
| 533 | 533 | { |
| 534 | - $user = $this->auth->getUser(); |
|
| 534 | + $user = $this->auth->getUser(); |
|
| 535 | 535 | |
| 536 | 536 | $jobEntity = $this->initializeJob()->get($this->params()); |
| 537 | 537 | |
@@ -82,27 +82,27 @@ |
||
| 82 | 82 | |
| 83 | 83 | $containerId = $container->getAttribute('id'); |
| 84 | 84 | if (!$containerId) { |
| 85 | - $containerId = 'wizardcontainer-' . strtolower(str_replace('\\', '-', get_class($container))); |
|
| 85 | + $containerId = 'wizardcontainer-'.strtolower(str_replace('\\', '-', get_class($container))); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | foreach ($container as $tabElement) { |
| 89 | - $tabId = $containerId . '-' . strtolower($tabElement->getName()); |
|
| 90 | - $tabsNav .= '<li><a data-toggle="tab" href="#' . $tabId . '">' . $translate($tabElement->getLabel()) . '</a></li>'; |
|
| 91 | - $tabsContent .= '<div class="tab-pane" id="' . $tabId . '">' |
|
| 89 | + $tabId = $containerId.'-'.strtolower($tabElement->getName()); |
|
| 90 | + $tabsNav .= '<li><a data-toggle="tab" href="#'.$tabId.'">'.$translate($tabElement->getLabel()).'</a></li>'; |
|
| 91 | + $tabsContent .= '<div class="tab-pane" id="'.$tabId.'">' |
|
| 92 | 92 | . $formContainer($tabElement, $layout, $parameter) |
| 93 | 93 | . '</div>'; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - $content .= '<div class="wizard-container" id="' . $containerId . '">' |
|
| 97 | - . '<ul>' . $tabsNav . '</ul>' |
|
| 98 | - . '<div class="tab-content">' . $tabsContent . '</div>' |
|
| 96 | + $content .= '<div class="wizard-container" id="'.$containerId.'">' |
|
| 97 | + . '<ul>'.$tabsNav.'</ul>' |
|
| 98 | + . '<div class="tab-content">'.$tabsContent.'</div>' |
|
| 99 | 99 | . '<ul class="pager wizard">' |
| 100 | - . '<li class="previous"><a href="javascript:;">← ' . $translate('previous') . '</a></li>' |
|
| 101 | - . '<li class="next"><a href="javascript:;">' . $translate('Next') . ' →</a></li>' |
|
| 102 | - . '<li class="finish' . ($containerParams['finish_enabled'] ? '' : ' disabled') . '">' |
|
| 100 | + . '<li class="previous"><a href="javascript:;">← '.$translate('previous').'</a></li>' |
|
| 101 | + . '<li class="next"><a href="javascript:;">'.$translate('Next').' →</a></li>' |
|
| 102 | + . '<li class="finish'.($containerParams['finish_enabled'] ? '' : ' disabled').'">' |
|
| 103 | 103 | . (false !== $containerParams['finish_label'] |
| 104 | - ? '<a class="pull-right" href="' . $containerParams['finish_href'] . '">' |
|
| 105 | - . $translate($containerParams['finish_label']) . ' •</a>' |
|
| 104 | + ? '<a class="pull-right" href="'.$containerParams['finish_href'].'">' |
|
| 105 | + . $translate($containerParams['finish_label']).' •</a>' |
|
| 106 | 106 | : '' |
| 107 | 107 | ) |
| 108 | 108 | . '</li></div>'; |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $notificationListener = $serviceLocator->getServiceLocator()->get('Core/Listener/Notification'); |
| 25 | 25 | $translator = $services->get('translator'); |
| 26 | 26 | |
| 27 | - $notification = new Notification($flashMessenger); |
|
| 27 | + $notification = new Notification($flashMessenger); |
|
| 28 | 28 | $notification->setListener($notificationListener); |
| 29 | 29 | $notification->setTranslator($translator); |
| 30 | 30 | |