@@ -25,16 +25,16 @@ |
||
25 | 25 | |
26 | 26 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
27 | 27 | |
28 | - /* @var \Jobs\Options\JobboardSearchOptions $options */ |
|
29 | - $options = $container->get( 'Jobs/JobboardSearchOptions' ); |
|
28 | + /* @var \Jobs\Options\JobboardSearchOptions $options */ |
|
29 | + $options = $container->get( 'Jobs/JobboardSearchOptions' ); |
|
30 | 30 | |
31 | - /** |
|
32 | - * @var $jobRepository Repository\Job |
|
33 | - */ |
|
34 | - $jobRepository = $container->get( 'repositories' )->get( 'Jobs/Job' ); |
|
35 | - $defaultListener = $container->get( 'DefaultListeners' ); |
|
36 | - $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' ); |
|
31 | + /** |
|
32 | + * @var $jobRepository Repository\Job |
|
33 | + */ |
|
34 | + $jobRepository = $container->get( 'repositories' )->get( 'Jobs/Job' ); |
|
35 | + $defaultListener = $container->get( 'DefaultListeners' ); |
|
36 | + $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' ); |
|
37 | 37 | |
38 | - return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] ); |
|
38 | + return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] ); |
|
39 | 39 | } |
40 | 40 | } |
@@ -26,15 +26,15 @@ |
||
26 | 26 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
27 | 27 | |
28 | 28 | /* @var \Jobs\Options\JobboardSearchOptions $options */ |
29 | - $options = $container->get( 'Jobs/JobboardSearchOptions' ); |
|
29 | + $options = $container->get('Jobs/JobboardSearchOptions'); |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @var $jobRepository Repository\Job |
33 | 33 | */ |
34 | - $jobRepository = $container->get( 'repositories' )->get( 'Jobs/Job' ); |
|
35 | - $defaultListener = $container->get( 'DefaultListeners' ); |
|
36 | - $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' ); |
|
34 | + $jobRepository = $container->get('repositories')->get('Jobs/Job'); |
|
35 | + $defaultListener = $container->get('DefaultListeners'); |
|
36 | + $imageFileCacheManager = $container->get('Organizations\ImageFileCache\Manager'); |
|
37 | 37 | |
38 | - return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] ); |
|
38 | + return new JobboardController($defaultListener, $jobRepository, $imageFileCacheManager, ['count' => $options->getPerPage()]); |
|
39 | 39 | } |
40 | 40 | } |
@@ -66,7 +66,7 @@ |
||
66 | 66 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
67 | 67 | { |
68 | 68 | $factory = $this->getParentFactory(); |
69 | - $select = $factory($container,$requestedName); |
|
69 | + $select = $factory($container, $requestedName); |
|
70 | 70 | $select->setViewPartial('jobs/form/multiposting-checkboxes'); |
71 | 71 | $select->setHeadscripts(array('Jobs/js/form.multiposting-checkboxes.js')); |
72 | 72 | return $select; |
@@ -22,26 +22,26 @@ |
||
22 | 22 | |
23 | 23 | class ConsoleController extends AbstractActionController |
24 | 24 | { |
25 | - /** |
|
26 | - * @var RepositoryService |
|
27 | - */ |
|
28 | - private $repositories; |
|
25 | + /** |
|
26 | + * @var RepositoryService |
|
27 | + */ |
|
28 | + private $repositories; |
|
29 | 29 | |
30 | - public function __construct( |
|
31 | - RepositoryService $repositories |
|
32 | - ) |
|
33 | - { |
|
34 | - $this->repositories = $repositories; |
|
35 | - } |
|
30 | + public function __construct( |
|
31 | + RepositoryService $repositories |
|
32 | + ) |
|
33 | + { |
|
34 | + $this->repositories = $repositories; |
|
35 | + } |
|
36 | 36 | |
37 | - static public function factory(ContainerInterface $container) |
|
38 | - { |
|
39 | - return new self( |
|
40 | - $container->get('repositories') |
|
41 | - ); |
|
42 | - } |
|
37 | + static public function factory(ContainerInterface $container) |
|
38 | + { |
|
39 | + return new self( |
|
40 | + $container->get('repositories') |
|
41 | + ); |
|
42 | + } |
|
43 | 43 | |
44 | - public function expireJobsAction() |
|
44 | + public function expireJobsAction() |
|
45 | 45 | { |
46 | 46 | $repositories = $this->repositories; |
47 | 47 | /* @var \Jobs\Repository\Job $jobsRepo */ |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | $date = new \DateTime('today'); |
58 | - $date->sub(new \DateInterval('P' . $days . 'D')); |
|
58 | + $date->sub(new \DateInterval('P'.$days.'D')); |
|
59 | 59 | |
60 | - $query = [ |
|
60 | + $query = [ |
|
61 | 61 | '$and' => [ |
62 | 62 | ['status.name' => StatusInterface::ACTIVE], |
63 | 63 | ['$or' => [ |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | $offset = 0; |
75 | 75 | if ($limit && false !== strpos($limit, ',')) { |
76 | - list($limit,$offset) = explode(',', $limit); |
|
76 | + list($limit, $offset) = explode(',', $limit); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | $jobs = $jobsRepo->findBy($query, null, (int) $limit, (int) $offset); |
@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | if ($info) { |
87 | - echo count($jobs) , ' Jobs'; |
|
88 | - if ($offset) { echo ' starting from ' . $offset; } |
|
89 | - echo PHP_EOL . PHP_EOL; |
|
87 | + echo count($jobs), ' Jobs'; |
|
88 | + if ($offset) { echo ' starting from '.$offset; } |
|
89 | + echo PHP_EOL.PHP_EOL; |
|
90 | 90 | $this->listExpiredJobs($jobs); |
91 | 91 | return; |
92 | 92 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | echo "$count jobs found, which have to expire ...\n"; |
100 | 100 | |
101 | - $progress = new ProgressBar( |
|
101 | + $progress = new ProgressBar( |
|
102 | 102 | new ConsoleAdapter( |
103 | 103 | array( |
104 | 104 | 'elements' => array( |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /* @var \Jobs\Entity\Job $job */ |
123 | 123 | foreach ($jobs as $job) { |
124 | - $progress->update($i++, 'Job ' . $i . ' / ' . $count); |
|
124 | + $progress->update($i++, 'Job '.$i.' / '.$count); |
|
125 | 125 | |
126 | 126 | $job->changeStatus('expired'); |
127 | 127 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $i = 0; |
150 | 150 | /* @var Job $job */ |
151 | 151 | foreach ($jobs as $job) { |
152 | - $progress->update($i++, 'Job ' . $i . ' / ' . $count); |
|
152 | + $progress->update($i++, 'Job '.$i.' / '.$count); |
|
153 | 153 | |
154 | 154 | $permissions = $job->getPermissions(); |
155 | 155 | $user = $job->getUser(); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | continue; |
158 | 158 | } |
159 | 159 | try { |
160 | - $group = $user->getGroup($job->getCompany()); |
|
160 | + $group = $user->getGroup($job->getCompany()); |
|
161 | 161 | } catch (\Exception $e) { |
162 | 162 | continue; |
163 | 163 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $org = $job->getCompany(); |
197 | 197 | } |
198 | 198 | printf( |
199 | - '%s %s %s %-30s %-20s' . PHP_EOL, |
|
199 | + '%s %s %s %-30s %-20s'.PHP_EOL, |
|
200 | 200 | $id, |
201 | 201 | $job->getDatePublishStart()->format('Y-m-d'), |
202 | 202 | $job->getDatePublishEnd()->format('Y-m-d'), |
@@ -204,6 +204,6 @@ discard block |
||
204 | 204 | substr($org, 0, 20) |
205 | 205 | ); |
206 | 206 | } |
207 | - return count($jobs) . ' Jobs.'; |
|
207 | + return count($jobs).' Jobs.'; |
|
208 | 208 | } |
209 | 209 | } |
@@ -50,11 +50,11 @@ |
||
50 | 50 | * @param Repository\Job $jobRepository |
51 | 51 | */ |
52 | 52 | public function __construct( |
53 | - DefaultListener $defaultListener, |
|
54 | - Repository\Job $jobRepository, |
|
55 | - ImageFileCacheManager $imageFileCacheManager, |
|
56 | - $options |
|
57 | - ) |
|
53 | + DefaultListener $defaultListener, |
|
54 | + Repository\Job $jobRepository, |
|
55 | + ImageFileCacheManager $imageFileCacheManager, |
|
56 | + $options |
|
57 | + ) |
|
58 | 58 | { |
59 | 59 | $this->jobRepository = $jobRepository; |
60 | 60 | $this->options = $options; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function attachDefaultListeners() |
69 | 69 | { |
70 | 70 | parent::attachDefaultListeners(); |
71 | - $events = $this->getEventManager(); |
|
71 | + $events = $this->getEventManager(); |
|
72 | 72 | $this->defaultListener->attach($events); |
73 | 73 | return $this; |
74 | 74 | } |
@@ -91,8 +91,8 @@ discard block |
||
91 | 91 | $request = $this->getRequest(); |
92 | 92 | $getParams = $request->getQuery(); |
93 | 93 | $routeParams = $this->params()->fromRoute(); |
94 | - if (isset($routeParams['q']) && !isset($getParams['q'])){ |
|
95 | - $getParams['q']=$routeParams['q']; |
|
94 | + if (isset($routeParams['q']) && !isset($getParams['q'])) { |
|
95 | + $getParams['q'] = $routeParams['q']; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | $result = $this->pagination([ |
@@ -28,31 +28,31 @@ discard block |
||
28 | 28 | */ |
29 | 29 | class AdminCategoriesController extends AbstractActionController |
30 | 30 | { |
31 | - private $adminCategoriesForm; |
|
31 | + private $adminCategoriesForm; |
|
32 | 32 | |
33 | - /** |
|
34 | - * @var Categories |
|
35 | - */ |
|
36 | - private $jobsCategoryRepo; |
|
33 | + /** |
|
34 | + * @var Categories |
|
35 | + */ |
|
36 | + private $jobsCategoryRepo; |
|
37 | 37 | |
38 | - private $repositories; |
|
38 | + private $repositories; |
|
39 | 39 | |
40 | - private $viewHelperManager; |
|
40 | + private $viewHelperManager; |
|
41 | 41 | |
42 | - static public function factory(ContainerInterface $container) |
|
43 | - { |
|
44 | - $ob = new static(); |
|
45 | - $ob->initContainer($container); |
|
46 | - return $ob; |
|
47 | - } |
|
42 | + static public function factory(ContainerInterface $container) |
|
43 | + { |
|
44 | + $ob = new static(); |
|
45 | + $ob->initContainer($container); |
|
46 | + return $ob; |
|
47 | + } |
|
48 | 48 | |
49 | - public function initContainer(ContainerInterface $container) |
|
50 | - { |
|
51 | - $this->adminCategoriesForm = $container->get('forms')->get('Jobs/AdminCategories'); |
|
52 | - $this->repositories = $container->get('repositories'); |
|
53 | - $this->jobsCategoryRepo = $container->get('repositories')->get('Jobs/Category'); |
|
54 | - $this->viewHelperManager = $container->get('ViewHelperManager'); |
|
55 | - } |
|
49 | + public function initContainer(ContainerInterface $container) |
|
50 | + { |
|
51 | + $this->adminCategoriesForm = $container->get('forms')->get('Jobs/AdminCategories'); |
|
52 | + $this->repositories = $container->get('repositories'); |
|
53 | + $this->jobsCategoryRepo = $container->get('repositories')->get('Jobs/Category'); |
|
54 | + $this->viewHelperManager = $container->get('ViewHelperManager'); |
|
55 | + } |
|
56 | 56 | |
57 | 57 | public function indexAction() |
58 | 58 | { |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | { |
75 | 75 | //$services = $this->serviceLocator; |
76 | 76 | $form = $this->adminCategoriesForm; |
77 | - $repositories = $this->repositories; |
|
77 | + $repositories = $this->repositories; |
|
78 | 78 | $rep = $this->jobsCategoryRepo; |
79 | 79 | |
80 | 80 | $professions = $rep->findOneBy(['value' => 'professions']); |
@@ -26,34 +26,34 @@ discard block |
||
26 | 26 | */ |
27 | 27 | class AdminController extends AbstractActionController implements ContainerAwareInterface |
28 | 28 | { |
29 | - /** |
|
30 | - * @var RepositoryService |
|
31 | - */ |
|
32 | - private $repositories; |
|
29 | + /** |
|
30 | + * @var RepositoryService |
|
31 | + */ |
|
32 | + private $repositories; |
|
33 | 33 | |
34 | - /** |
|
35 | - * @var FormElementManagerTrait |
|
36 | - */ |
|
37 | - private $formManager; |
|
34 | + /** |
|
35 | + * @var FormElementManagerTrait |
|
36 | + */ |
|
37 | + private $formManager; |
|
38 | 38 | |
39 | - private $jobEvents; |
|
39 | + private $jobEvents; |
|
40 | 40 | |
41 | - static public function factory(ContainerInterface $container) |
|
42 | - { |
|
43 | - $ob = new self(); |
|
44 | - $ob->setContainer($container); |
|
45 | - return $ob; |
|
46 | - } |
|
41 | + static public function factory(ContainerInterface $container) |
|
42 | + { |
|
43 | + $ob = new self(); |
|
44 | + $ob->setContainer($container); |
|
45 | + return $ob; |
|
46 | + } |
|
47 | 47 | |
48 | - public function setContainer( ContainerInterface $container ) |
|
49 | - { |
|
50 | - $this->repositories = $container->get('repositories'); |
|
51 | - $this->formManager = $container->get('forms'); |
|
52 | - $this->jobEvents = $container->get('Jobs/Events'); |
|
53 | - } |
|
48 | + public function setContainer( ContainerInterface $container ) |
|
49 | + { |
|
50 | + $this->repositories = $container->get('repositories'); |
|
51 | + $this->formManager = $container->get('forms'); |
|
52 | + $this->jobEvents = $container->get('Jobs/Events'); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - public function indexAction() |
|
56 | + public function indexAction() |
|
57 | 57 | { |
58 | 58 | $params = $this->params()->fromQuery(); |
59 | 59 | return $this->pagination([ |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | return new JsonModel([ |
92 | 92 | 'valid' => $valid, |
93 | 93 | 'errors' => $errors |
94 | - ]); |
|
94 | + ]); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | $form->bind($job); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | return $ob; |
46 | 46 | } |
47 | 47 | |
48 | - public function setContainer( ContainerInterface $container ) |
|
48 | + public function setContainer(ContainerInterface $container) |
|
49 | 49 | { |
50 | 50 | $this->repositories = $container->get('repositories'); |
51 | 51 | $this->formManager = $container->get('forms'); |
@@ -57,9 +57,9 @@ discard block |
||
57 | 57 | { |
58 | 58 | $params = $this->params()->fromQuery(); |
59 | 59 | return $this->pagination([ |
60 | - 'params' => [ 'Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status' ] ], |
|
61 | - 'form' => [ 'as' => 'form', 'Jobs/AdminSearch' ], |
|
62 | - 'paginator' => [ 'as' => 'jobs', 'Jobs/Admin' ], |
|
60 | + 'params' => ['Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status']], |
|
61 | + 'form' => ['as' => 'form', 'Jobs/AdminSearch'], |
|
62 | + 'paginator' => ['as' => 'jobs', 'Jobs/Admin'], |
|
63 | 63 | ]); |
64 | 64 | } |
65 | 65 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $oldStatus = $job->getStatus(); |
85 | 85 | $job->changeStatus($post['status'], '[System] Status changed via Admin GUI.'); |
86 | 86 | $events = $this->jobEvents; |
87 | - $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, [ 'job' => $job, 'status' => $oldStatus ]); |
|
87 | + $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, ['job' => $job, 'status' => $oldStatus]); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | |
97 | 97 | $form->bind($job); |
98 | 98 | |
99 | - return [ 'form' => $form, 'job' => $job ]; |
|
99 | + return ['form' => $form, 'job' => $job]; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | } |
@@ -42,13 +42,13 @@ |
||
42 | 42 | |
43 | 43 | $this->add( |
44 | 44 | array( |
45 | - 'type' => 'Jobs/MultipostingSelect', |
|
46 | - 'property' => true, |
|
47 | - 'name' => 'portals', |
|
48 | - 'options' => array( |
|
49 | - 'label' => /*@translate*/ 'Portals', |
|
50 | - ), |
|
51 | - ) |
|
45 | + 'type' => 'Jobs/MultipostingSelect', |
|
46 | + 'property' => true, |
|
47 | + 'name' => 'portals', |
|
48 | + 'options' => array( |
|
49 | + 'label' => /*@translate*/ 'Portals', |
|
50 | + ), |
|
51 | + ) |
|
52 | 52 | ); |
53 | 53 | } |
54 | 54 |
@@ -62,7 +62,7 @@ |
||
62 | 62 | 'priority' => 100, |
63 | 63 | 'label' => /*@translate*/ 'Basic Data', |
64 | 64 | 'options' => [ |
65 | - 'label' => /*@translate*/ 'Basic Data' |
|
65 | + 'label' => /*@translate*/ 'Basic Data' |
|
66 | 66 | ], |
67 | 67 | 'property' => true, |
68 | 68 | 'forms' => [ |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | 'description' => [ |
118 | 118 | 'priority' => '80', |
119 | - 'options' => [ 'label' => /*@translate*/ 'Create job opening' ], |
|
119 | + 'options' => ['label' => /*@translate*/ 'Create job opening'], |
|
120 | 120 | 'property' => true, |
121 | 121 | 'forms' => [ |
122 | 122 | 'descriptionForm' => array( |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | 'preview' => [ |
130 | 130 | 'priority' => 60, |
131 | - 'options' => [ 'label' => /*@translate*/ 'Preview' ], |
|
131 | + 'options' => ['label' => /*@translate*/ 'Preview'], |
|
132 | 132 | 'property' => true, |
133 | 133 | 'forms' => [ |
134 | 134 | 'previewForm' => array( |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | |
143 | 143 | $this->setForms($elements); |
144 | 144 | |
145 | - $events = $this->getEventManager(); |
|
145 | + $events = $this->getEventManager(); |
|
146 | 146 | $events->trigger(FormEvent::EVENT_INIT, $this); |
147 | 147 | } |
148 | 148 | |
149 | 149 | public function renderPost(Renderer $renderer) |
150 | 150 | { |
151 | - $coreformsjs = $renderer->basepath('/Core/js/core.forms.js'); |
|
151 | + $coreformsjs = $renderer->basepath('/Core/js/core.forms.js'); |
|
152 | 152 | $javaScript = <<<JS |
153 | 153 | $(document).ready(function() { |
154 | 154 |
@@ -15,12 +15,12 @@ |
||
15 | 15 | |
16 | 16 | class UniqueApplyIdFactory implements FactoryInterface |
17 | 17 | { |
18 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
19 | - { |
|
20 | - $repositories = $container->get('repositories'); |
|
21 | - $jobs = $repositories->get('Jobs/Job'); |
|
22 | - $validator = new UniqueApplyId($jobs); |
|
18 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
19 | + { |
|
20 | + $repositories = $container->get('repositories'); |
|
21 | + $jobs = $repositories->get('Jobs/Job'); |
|
22 | + $validator = new UniqueApplyId($jobs); |
|
23 | 23 | |
24 | - return $validator; |
|
25 | - } |
|
24 | + return $validator; |
|
25 | + } |
|
26 | 26 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | |
16 | 16 | class UniqueApplyIdFactory implements FactoryInterface |
17 | 17 | { |
18 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
18 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
19 | 19 | { |
20 | 20 | $repositories = $container->get('repositories'); |
21 | 21 | $jobs = $repositories->get('Jobs/Job'); |