@@ -60,11 +60,11 @@ discard block |
||
60 | 60 | |
61 | 61 | protected $viewHelper; |
62 | 62 | |
63 | - /** |
|
64 | - * @param ContainerInterface $container |
|
65 | - * |
|
66 | - * @return ApplyController |
|
67 | - */ |
|
63 | + /** |
|
64 | + * @param ContainerInterface $container |
|
65 | + * |
|
66 | + * @return ApplyController |
|
67 | + */ |
|
68 | 68 | static public function factory(ContainerInterface $container) |
69 | 69 | { |
70 | 70 | $ob = new self(); |
@@ -72,24 +72,24 @@ discard block |
||
72 | 72 | return $ob; |
73 | 73 | } |
74 | 74 | |
75 | - public function setContainer( ContainerInterface $container ) |
|
76 | - { |
|
77 | - $this->config = $container->get('Config'); |
|
78 | - $this->imageCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
|
79 | - $this->validator = $container->get('ValidatorManager'); |
|
80 | - $this->repositories = $container->get('repositories'); |
|
81 | - $this->appEvents = $container->get('Applications/Events'); |
|
82 | - $this->viewHelper = $container->get('ViewHelperManager'); |
|
83 | - } |
|
75 | + public function setContainer( ContainerInterface $container ) |
|
76 | + { |
|
77 | + $this->config = $container->get('Config'); |
|
78 | + $this->imageCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
|
79 | + $this->validator = $container->get('ValidatorManager'); |
|
80 | + $this->repositories = $container->get('repositories'); |
|
81 | + $this->appEvents = $container->get('Applications/Events'); |
|
82 | + $this->viewHelper = $container->get('ViewHelperManager'); |
|
83 | + } |
|
84 | 84 | |
85 | 85 | |
86 | - public function attachDefaultListeners() |
|
87 | - { |
|
88 | - parent::attachDefaultListeners(); |
|
89 | - $events = $this->getEventManager(); |
|
90 | - $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10); |
|
91 | - return $this; |
|
92 | - } |
|
86 | + public function attachDefaultListeners() |
|
87 | + { |
|
88 | + parent::attachDefaultListeners(); |
|
89 | + $events = $this->getEventManager(); |
|
90 | + $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 10); |
|
91 | + return $this; |
|
92 | + } |
|
93 | 93 | |
94 | 94 | public function preDispatch(MvcEvent $e) |
95 | 95 | { |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | ->getHybridAuth(); |
267 | 267 | /* @var $authProfile \Hybrid_User_Profile */ |
268 | 268 | $authProfile = $hybridAuth->authenticate($network) |
269 | - ->getUserProfile(); |
|
269 | + ->getUserProfile(); |
|
270 | 270 | |
271 | 271 | /* @var \Auth\Entity\SocialProfiles\AbstractProfile $profile */ |
272 | 272 | $profile = $this->plugin('Auth/SocialProfiles')->fetch($network); |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | return $this->redirect() |
322 | - ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
322 | + ->toRoute('lang/apply', ['applyId' => $job->getApplyId()], $urlOptions); |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | public function processPreviewAction() |
@@ -329,11 +329,11 @@ discard block |
||
329 | 329 | |
330 | 330 | public function processAction() |
331 | 331 | { |
332 | - $params = $this->params(); |
|
332 | + $params = $this->params(); |
|
333 | 333 | $formName = $params->fromQuery('form'); |
334 | 334 | $form = $this->formContainer->getForm($formName); |
335 | 335 | $postData = $form->getOption('use_post_array') ? $params->fromPost() : array(); |
336 | - //@TODO: [ZF3] option use_files_array is false by default |
|
336 | + //@TODO: [ZF3] option use_files_array is false by default |
|
337 | 337 | //$filesData = $form->getOption('use_files_array') ? $params->fromFiles() : array(); |
338 | 338 | $form->setData(array_merge($postData,$_FILES)); |
339 | 339 | |
@@ -363,9 +363,9 @@ discard block |
||
363 | 363 | |
364 | 364 | return new JsonModel( |
365 | 365 | array( |
366 | - 'valid' => $form->isValid(), |
|
367 | - 'content' => $content, |
|
368 | - 'isApplicationValid' => $this->checkApplication($application) |
|
366 | + 'valid' => $form->isValid(), |
|
367 | + 'content' => $content, |
|
368 | + 'isApplicationValid' => $this->checkApplication($application) |
|
369 | 369 | ) |
370 | 370 | ); |
371 | 371 | } |
@@ -30,70 +30,70 @@ discard block |
||
30 | 30 | */ |
31 | 31 | class ManageController extends AbstractActionController |
32 | 32 | { |
33 | - /** |
|
34 | - * @var RepositoryService |
|
35 | - */ |
|
36 | - private $repositories; |
|
33 | + /** |
|
34 | + * @var RepositoryService |
|
35 | + */ |
|
36 | + private $repositories; |
|
37 | 37 | |
38 | - /** |
|
39 | - * @var |
|
40 | - */ |
|
41 | - private $coreNavigation; |
|
38 | + /** |
|
39 | + * @var |
|
40 | + */ |
|
41 | + private $coreNavigation; |
|
42 | 42 | |
43 | - private $forms; |
|
43 | + private $forms; |
|
44 | 44 | |
45 | - private $appOptions; |
|
45 | + private $appOptions; |
|
46 | 46 | |
47 | - private $appEvents; |
|
47 | + private $appEvents; |
|
48 | 48 | |
49 | - private $translator; |
|
49 | + private $translator; |
|
50 | 50 | |
51 | - private $container; |
|
51 | + private $container; |
|
52 | 52 | |
53 | - /** |
|
54 | - * ManageController constructor. |
|
55 | - * |
|
56 | - * @param RepositoryService $repositories |
|
57 | - */ |
|
58 | - public function __construct( |
|
59 | - RepositoryService $repositories, |
|
60 | - $coreNavigation, |
|
61 | - $forms, |
|
62 | - $appOptions, |
|
63 | - $appEvents, |
|
64 | - $translator, |
|
65 | - $container |
|
66 | - ) |
|
67 | - { |
|
68 | - $this->repositories = $repositories; |
|
69 | - $this->coreNavigation = $coreNavigation; |
|
70 | - $this->forms = $forms; |
|
71 | - $this->appOptions = $appOptions; |
|
72 | - $this->appEvents = $appEvents; |
|
73 | - $this->translator = $translator; |
|
74 | - $this->container = $container; |
|
75 | - } |
|
53 | + /** |
|
54 | + * ManageController constructor. |
|
55 | + * |
|
56 | + * @param RepositoryService $repositories |
|
57 | + */ |
|
58 | + public function __construct( |
|
59 | + RepositoryService $repositories, |
|
60 | + $coreNavigation, |
|
61 | + $forms, |
|
62 | + $appOptions, |
|
63 | + $appEvents, |
|
64 | + $translator, |
|
65 | + $container |
|
66 | + ) |
|
67 | + { |
|
68 | + $this->repositories = $repositories; |
|
69 | + $this->coreNavigation = $coreNavigation; |
|
70 | + $this->forms = $forms; |
|
71 | + $this->appOptions = $appOptions; |
|
72 | + $this->appEvents = $appEvents; |
|
73 | + $this->translator = $translator; |
|
74 | + $this->container = $container; |
|
75 | + } |
|
76 | 76 | |
77 | - /** |
|
78 | - * @param ContainerInterface $container |
|
79 | - * |
|
80 | - * @return ManageController |
|
81 | - */ |
|
82 | - static public function factory(ContainerInterface $container) |
|
83 | - { |
|
84 | - $ob = new self( |
|
85 | - $container->get('Core/RepositoryService'), |
|
86 | - $container->get('Core/Navigation'), |
|
87 | - $container->get('forms'), |
|
88 | - $container->get('Applications/Options'), |
|
89 | - $container->get('Applications/Events'), |
|
90 | - $container->get('translator'), |
|
91 | - $container |
|
92 | - ); |
|
93 | - return $ob; |
|
94 | - } |
|
77 | + /** |
|
78 | + * @param ContainerInterface $container |
|
79 | + * |
|
80 | + * @return ManageController |
|
81 | + */ |
|
82 | + static public function factory(ContainerInterface $container) |
|
83 | + { |
|
84 | + $ob = new self( |
|
85 | + $container->get('Core/RepositoryService'), |
|
86 | + $container->get('Core/Navigation'), |
|
87 | + $container->get('forms'), |
|
88 | + $container->get('Applications/Options'), |
|
89 | + $container->get('Applications/Events'), |
|
90 | + $container->get('translator'), |
|
91 | + $container |
|
92 | + ); |
|
93 | + return $ob; |
|
94 | + } |
|
95 | 95 | |
96 | - /** |
|
96 | + /** |
|
97 | 97 | * (non-PHPdoc) |
98 | 98 | * @see \Zend\Mvc\Controller\AbstractActionController::onDispatch() |
99 | 99 | */ |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $application->changeStatus( |
165 | 165 | $application->getStatus(), |
166 | 166 | sprintf(/*@translate*/ 'Application was read by %s', |
167 | - $this->auth()->getUser()->getInfo()->getDisplayName())); |
|
167 | + $this->auth()->getUser()->getInfo()->getDisplayName())); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | |
@@ -191,15 +191,15 @@ discard block |
||
191 | 191 | $viewModel->setVariables( |
192 | 192 | /*array( |
193 | 193 | 'application' => */$this->builders |
194 | - ->get('JsonApplication') |
|
195 | - ->unbuild($application) |
|
194 | + ->get('JsonApplication') |
|
195 | + ->unbuild($application) |
|
196 | 196 | ); |
197 | 197 | $viewModel->setVariable('isUnread', $applicationIsUnread); |
198 | 198 | $return = $viewModel; |
199 | 199 | break; |
200 | 200 | case 'pdf': |
201 | - // @TODO: [ZF3] Refactor this so we can inject Core/Html2Pdf service during controller creation |
|
202 | - $pdf = $this->container->get('Core/Html2Pdf'); |
|
201 | + // @TODO: [ZF3] Refactor this so we can inject Core/Html2Pdf service during controller creation |
|
202 | + $pdf = $this->container->get('Core/Html2Pdf'); |
|
203 | 203 | $return['format'] = $format; |
204 | 204 | break; |
205 | 205 | default: |
@@ -356,12 +356,12 @@ discard block |
||
356 | 356 | |
357 | 357 | /* @var ApplicationEvent $event */ |
358 | 358 | $event = $events->getEvent(ApplicationEvent::EVENT_APPLICATION_STATUS_CHANGE, |
359 | - $this, |
|
360 | - [ |
|
361 | - 'application' => $application, |
|
362 | - 'status' => $status, |
|
363 | - 'user' => $this->auth()->getUser(), |
|
364 | - ] |
|
359 | + $this, |
|
360 | + [ |
|
361 | + 'application' => $application, |
|
362 | + 'status' => $status, |
|
363 | + 'user' => $this->auth()->getUser(), |
|
364 | + ] |
|
365 | 365 | ); |
366 | 366 | |
367 | 367 | $event->setIsPostRequest($request->isPost()); |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | $emailAddress = $this->params()->fromQuery('email'); |
412 | 412 | /* @var \Applications\Entity\Application $application */ |
413 | 413 | $application = $this->repositories->get('Applications/Application') |
414 | - ->find($this->params('id')); |
|
414 | + ->find($this->params('id')); |
|
415 | 415 | |
416 | 416 | $this->acl($application, 'forward'); |
417 | 417 |
@@ -25,9 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | class CommentController extends AbstractActionController implements ContainerAwareInterface |
27 | 27 | { |
28 | - private $repositories; |
|
28 | + private $repositories; |
|
29 | 29 | |
30 | - private $formManager; |
|
30 | + private $formManager; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Lists comments of an application |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | $application->getComments()->add($comment); |
84 | 84 | $application->changeStatus($application->getStatus(), sprintf( |
85 | 85 | /* @translate */ 'Application was rated by %s', |
86 | - $this->auth()->getUser()->getInfo()->getDisplayName()) |
|
86 | + $this->auth()->getUser()->getInfo()->getDisplayName()) |
|
87 | 87 | ); |
88 | 88 | } |
89 | 89 | $viewModel->setVariable('isSaved', true); |
@@ -100,18 +100,18 @@ discard block |
||
100 | 100 | return $viewModel; |
101 | 101 | } |
102 | 102 | |
103 | - public function setContainer( ContainerInterface $container ) |
|
104 | - { |
|
105 | - $this->repositories = $container->get('repositories'); |
|
106 | - $this->formManager = $container->get('forms'); |
|
107 | - } |
|
103 | + public function setContainer( ContainerInterface $container ) |
|
104 | + { |
|
105 | + $this->repositories = $container->get('repositories'); |
|
106 | + $this->formManager = $container->get('forms'); |
|
107 | + } |
|
108 | 108 | |
109 | - /** |
|
110 | - * @param ContainerInterface $container |
|
111 | - * |
|
112 | - * @return CommentController |
|
113 | - */ |
|
114 | - static public function factory(ContainerInterface $container) |
|
109 | + /** |
|
110 | + * @param ContainerInterface $container |
|
111 | + * |
|
112 | + * @return CommentController |
|
113 | + */ |
|
114 | + static public function factory(ContainerInterface $container) |
|
115 | 115 | { |
116 | 116 | $ob = new self(); |
117 | 117 | $ob->setContainer($container); |
@@ -42,14 +42,14 @@ discard block |
||
42 | 42 | public function init() |
43 | 43 | { |
44 | 44 | $this->setName('emails') |
45 | - ->setLabel(/* @translate */ 'E-Mail Notifications'); |
|
45 | + ->setLabel(/* @translate */ 'E-Mail Notifications'); |
|
46 | 46 | |
47 | 47 | $this->add( |
48 | 48 | array('type' => Checkbox::class, |
49 | 49 | 'name' => 'mailAccess', |
50 | 50 | 'label' => 'foo', |
51 | 51 | 'options' => array('label' => /* @translate */ 'receive E-Mail alert', |
52 | - 'long_label' => /* @translate */ 'if checked, you\'ll be informed by mail about new applications.'), |
|
52 | + 'long_label' => /* @translate */ 'if checked, you\'ll be informed by mail about new applications.'), |
|
53 | 53 | ) |
54 | 54 | ); |
55 | 55 | $this->add( |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | array('type' => 'Zend\Form\Element\Checkbox', |
64 | 64 | 'name' => 'autoConfirmMail', |
65 | 65 | 'options' => array('label' => /* @translate */ 'confirm application immidiatly after submit', |
66 | - 'long_label' => /* @translate */ 'if checked, an application is immediatly confirmed. If unchecked confirmation is the duty of the recruiter.'), |
|
66 | + 'long_label' => /* @translate */ 'if checked, an application is immediatly confirmed. If unchecked confirmation is the duty of the recruiter.'), |
|
67 | 67 | ) |
68 | 68 | ); |
69 | 69 | $this->add( |
70 | 70 | array('type' => 'Zend\Form\Element\Textarea', |
71 | 71 | 'name' => 'mailConfirmationText', |
72 | - 'options' => array('label' => /* @translate */ 'Confirmation mail text', |
|
72 | + 'options' => array('label' => /* @translate */ 'Confirmation mail text', |
|
73 | 73 | 'description' => /* @translate */ 'default text of the acknowledgment of receipt mail to the applicant. The following variables can be used:<br><ul><li>##anrede_formell## = salutation. Includes gender, firstname and lastname.<li>##anrede_informell## = salutation. Includes fistname and lastname.</li><li>##job_title## = title of the jobs</li><li>##name## = name of the applicant.</li><li>##date## = date of recipt of the application.</li><li>##link## = Link to the application details</li></ul>' )) |
74 | 74 | ); |
75 | 75 | |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | |
118 | 118 | $this->add( |
119 | 119 | array( |
120 | - 'type' => 'Settings/DisableElementsCapableFormSettingsFieldset', |
|
121 | - 'name' => 'applyFormSettings', |
|
122 | - 'options' => array( |
|
120 | + 'type' => 'Settings/DisableElementsCapableFormSettingsFieldset', |
|
121 | + 'name' => 'applyFormSettings', |
|
122 | + 'options' => array( |
|
123 | 123 | |
124 | - ) |
|
124 | + ) |
|
125 | 125 | ) |
126 | 126 | ); |
127 | 127 | } |
@@ -115,27 +115,27 @@ |
||
115 | 115 | */ |
116 | 116 | protected function generateHtml() |
117 | 117 | { |
118 | - /* |
|
118 | + /* |
|
119 | 119 | * "ViewHelperManager" defined by ZF2 |
120 | 120 | * see http://framework.zend.com/manual/2.0/en/modules/zend.mvc.services.html#viewmanager |
121 | 121 | */ |
122 | - $viewManager = $this->viewManager; |
|
122 | + $viewManager = $this->viewManager; |
|
123 | 123 | |
124 | 124 | return $viewManager->get("partial")->__invoke('applications/mail/forward', array("application"=>$this->application)); |
125 | 125 | } |
126 | 126 | |
127 | 127 | public function setContainer(ContainerInterface $container) |
128 | 128 | { |
129 | - $this->viewManager = $container->get('ViewHelperManager'); |
|
129 | + $this->viewManager = $container->get('ViewHelperManager'); |
|
130 | 130 | } |
131 | 131 | |
132 | - /** |
|
133 | - * @param ContainerInterface $container |
|
134 | - * @param $requestedName |
|
135 | - * @param array $options |
|
136 | - * |
|
137 | - * @return Forward |
|
138 | - */ |
|
132 | + /** |
|
133 | + * @param ContainerInterface $container |
|
134 | + * @param $requestedName |
|
135 | + * @param array $options |
|
136 | + * |
|
137 | + * @return Forward |
|
138 | + */ |
|
139 | 139 | static public function factory(ContainerInterface $container,$requestedName,array $options=[]) |
140 | 140 | { |
141 | 141 | $ob = new self($options); |
@@ -112,16 +112,16 @@ |
||
112 | 112 | $eventManager->attach( |
113 | 113 | MvcEvent::EVENT_DISPATCH_ERROR, |
114 | 114 | function ($event) { |
115 | - if($event instanceof MvcEvent){ |
|
116 | - $application = $event->getApplication(); |
|
115 | + if($event instanceof MvcEvent){ |
|
116 | + $application = $event->getApplication(); |
|
117 | 117 | |
118 | - if ($application::ERROR_EXCEPTION == $event->getError()) { |
|
119 | - $ex = $event->getParam('exception'); |
|
120 | - if (404 == $ex->getCode()) { |
|
121 | - $event->setError($application::ERROR_CONTROLLER_NOT_FOUND); |
|
122 | - } |
|
123 | - } |
|
124 | - } |
|
118 | + if ($application::ERROR_EXCEPTION == $event->getError()) { |
|
119 | + $ex = $event->getParam('exception'); |
|
120 | + if (404 == $ex->getCode()) { |
|
121 | + $event->setError($application::ERROR_CONTROLLER_NOT_FOUND); |
|
122 | + } |
|
123 | + } |
|
124 | + } |
|
125 | 125 | }, |
126 | 126 | 500 |
127 | 127 | ); |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function getService($name) |
44 | 44 | { |
45 | - /* @TODO: [ZF3] ->getServiceLocator() should be removed in future */ |
|
46 | - $config = $this->dm->getConfiguration(); |
|
45 | + /* @TODO: [ZF3] ->getServiceLocator() should be removed in future */ |
|
46 | + $config = $this->dm->getConfiguration(); |
|
47 | 47 | return $this->dm->getConfiguration()->getServiceLocator()->get($name); |
48 | 48 | } |
49 | 49 | |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | { |
127 | 127 | $this->checkEntityType($entity); |
128 | 128 | $this->dm->remove($entity); |
129 | - if($flush){ |
|
130 | - $this->dm->flush($entity); |
|
131 | - } |
|
129 | + if($flush){ |
|
130 | + $this->dm->flush($entity); |
|
131 | + } |
|
132 | 132 | return $this; |
133 | 133 | } |
134 | 134 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | class ServiceLocatorAwareConfiguration extends Configuration |
16 | 16 | { |
17 | - public function setServiceLocator($serviceLocator) |
|
17 | + public function setServiceLocator($serviceLocator) |
|
18 | 18 | { |
19 | 19 | $this->attributes['serviceLocator'] = $serviceLocator; |
20 | 20 | return $this; |
@@ -22,17 +22,17 @@ |
||
22 | 22 | */ |
23 | 23 | class DocumentManagerFactory implements FactoryInterface |
24 | 24 | { |
25 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
26 | - $container->setAllowOverride(true); |
|
27 | - $container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default')); |
|
28 | - $container->setAllowOverride(false); |
|
25 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
26 | + $container->setAllowOverride(true); |
|
27 | + $container->setFactory('doctrine.configuration.odm_default', new ConfigurationFactory('odm_default')); |
|
28 | + $container->setAllowOverride(false); |
|
29 | 29 | |
30 | - $configFactory = new ConfigurationFactory('odm_default'); |
|
31 | - $config = $configFactory->createService($container); |
|
30 | + $configFactory = new ConfigurationFactory('odm_default'); |
|
31 | + $config = $configFactory->createService($container); |
|
32 | 32 | |
33 | - $dm = $container->get('doctrine.documentmanager.odm_default'); |
|
34 | - $dm = DoctrineDocumentManager::create($dm->getConnection(), $config, $dm->getEventManager()); |
|
35 | - $dm->getSchemaManager()->ensureIndexes(); |
|
36 | - return $dm; |
|
37 | - } |
|
33 | + $dm = $container->get('doctrine.documentmanager.odm_default'); |
|
34 | + $dm = DoctrineDocumentManager::create($dm->getConnection(), $config, $dm->getEventManager()); |
|
35 | + $dm->getSchemaManager()->ensureIndexes(); |
|
36 | + return $dm; |
|
37 | + } |
|
38 | 38 | } |