@@ -381,7 +381,6 @@ |
||
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
384 | - * @param mixed $element |
|
385 | 384 | * @return mixed |
386 | 385 | */ |
387 | 386 | protected function getElement($key) |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | protected $identityExtractor; |
27 | 27 | |
28 | - /** |
|
28 | + /** |
|
29 | 29 | * @param Collection $collection |
30 | 30 | */ |
31 | 31 | public function __construct(Collection $collection) |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $element = $this->getElement($key); |
82 | 82 | |
83 | 83 | if ($element !== false && $this->collection->removeElement($element)) { |
84 | - return $element; |
|
84 | + return $element; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | { |
109 | 109 | $element = $this->getElement($key); |
110 | 110 | |
111 | - return $element !== false ? $element : null; |
|
111 | + return $element !== false ? $element : null; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | |
185 | 185 | if ($element !== false) |
186 | 186 | { |
187 | - return $this->getKey($element); |
|
187 | + return $this->getKey($element); |
|
188 | 188 | } |
189 | 189 | } |
190 | 190 | |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | // validate mapped elements |
253 | 253 | array_map($this->getIdentityExtractor(), $mapped->toArray()); |
254 | 254 | |
255 | - return new static($mapped); |
|
255 | + return new static($mapped); |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
@@ -341,15 +341,15 @@ discard block |
||
341 | 341 | } |
342 | 342 | |
343 | 343 | /** |
344 | - * @param callable $identityExtractor |
|
345 | - * @return IdentityWrapper |
|
346 | - */ |
|
347 | - public function setIdentityExtractor(callable $identityExtractor) |
|
348 | - { |
|
349 | - $this->identityExtractor = $identityExtractor; |
|
344 | + * @param callable $identityExtractor |
|
345 | + * @return IdentityWrapper |
|
346 | + */ |
|
347 | + public function setIdentityExtractor(callable $identityExtractor) |
|
348 | + { |
|
349 | + $this->identityExtractor = $identityExtractor; |
|
350 | 350 | |
351 | - return $this; |
|
352 | - } |
|
351 | + return $this; |
|
352 | + } |
|
353 | 353 | |
354 | 354 | /** |
355 | 355 | * |
@@ -371,23 +371,23 @@ discard block |
||
371 | 371 | return $this->identityExtractor; |
372 | 372 | } |
373 | 373 | |
374 | - /** |
|
375 | - * @param mixed $element |
|
376 | - * @return mixed |
|
377 | - */ |
|
378 | - protected function getKey($element) |
|
379 | - { |
|
380 | - return call_user_func($this->getIdentityExtractor(), $element); |
|
381 | - } |
|
374 | + /** |
|
375 | + * @param mixed $element |
|
376 | + * @return mixed |
|
377 | + */ |
|
378 | + protected function getKey($element) |
|
379 | + { |
|
380 | + return call_user_func($this->getIdentityExtractor(), $element); |
|
381 | + } |
|
382 | 382 | |
383 | - /** |
|
384 | - * @param mixed $element |
|
385 | - * @return mixed |
|
386 | - */ |
|
387 | - protected function getElement($key) |
|
388 | - { |
|
389 | - return $this->collection->filter(function ($element) use ($key) { |
|
390 | - return $this->getKey($element) == $key; |
|
391 | - })->first(); |
|
392 | - } |
|
383 | + /** |
|
384 | + * @param mixed $element |
|
385 | + * @return mixed |
|
386 | + */ |
|
387 | + protected function getElement($key) |
|
388 | + { |
|
389 | + return $this->collection->filter(function ($element) use ($key) { |
|
390 | + return $this->getKey($element) == $key; |
|
391 | + })->first(); |
|
392 | + } |
|
393 | 393 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function getKeys() |
118 | 118 | { |
119 | - return $this->collection->map(function ($element) { |
|
119 | + return $this->collection->map(function($element) { |
|
120 | 120 | return $this->getKey($element); |
121 | 121 | })->toArray(); |
122 | 122 | } |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | */ |
310 | 310 | public function offsetExists($offset) |
311 | 311 | { |
312 | - return (bool)$this->getElement($offset); |
|
312 | + return (bool) $this->getElement($offset); |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | /** |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | { |
360 | 360 | if (!isset($this->identityExtractor)) { |
361 | 361 | // default identity extractor |
362 | - $this->identityExtractor = function ($element) { |
|
362 | + $this->identityExtractor = function($element) { |
|
363 | 363 | if (!is_callable([$element, 'getId'])) { |
364 | 364 | throw new \LogicException('$element must have getId() method'); |
365 | 365 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | protected function getElement($key) |
388 | 388 | { |
389 | - return $this->collection->filter(function ($element) use ($key) { |
|
389 | + return $this->collection->filter(function($element) use ($key) { |
|
390 | 390 | return $this->getKey($element) == $key; |
391 | 391 | })->first(); |
392 | 392 | } |
@@ -137,8 +137,7 @@ |
||
137 | 137 | if ($this->getElement($key) !== false) |
138 | 138 | { |
139 | 139 | $this->collection->set($this->collection->indexOf($value), $value); |
140 | - } |
|
141 | - else |
|
140 | + } else |
|
142 | 141 | { |
143 | 142 | $this->collection->add($value); |
144 | 143 | } |
@@ -179,7 +179,7 @@ |
||
179 | 179 | |
180 | 180 | /** |
181 | 181 | * @throws \RuntimeException |
182 | - * @return Collection |
|
182 | + * @return \Core\Entity\EntityInterface |
|
183 | 183 | */ |
184 | 184 | protected function getCollection() |
185 | 185 | { |
@@ -80,12 +80,12 @@ |
||
80 | 80 | $collection[] = $this->newEntry; |
81 | 81 | $form = $this->buildForm($key, $this->newEntry); |
82 | 82 | $eventManager = $form->getEventManager(); |
83 | - $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) { |
|
83 | + $eventManager->attach(CoreForm::EVENT_IS_VALID, function(Event $event) use ($collection) { |
|
84 | 84 | if (!$event->getParam('isValid')) { |
85 | 85 | $collection->removeElement($this->newEntry); |
86 | 86 | } |
87 | 87 | }); |
88 | - $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) { |
|
88 | + $eventManager->attach(CoreForm::EVENT_PREPARE, function(Event $event) use ($collection) { |
|
89 | 89 | $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry)); |
90 | 90 | }); |
91 | 91 |
@@ -80,12 +80,12 @@ discard block |
||
80 | 80 | $collection[] = $this->newEntry; |
81 | 81 | $form = $this->buildForm($key, $this->newEntry); |
82 | 82 | $eventManager = $form->getEventManager(); |
83 | - $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) { |
|
83 | + $eventManager->attach(CoreForm::EVENT_IS_VALID, function (Event $event) use ($collection) { |
|
84 | 84 | if (!$event->getParam('isValid')) { |
85 | 85 | $collection->removeElement($this->newEntry); |
86 | 86 | } |
87 | 87 | }); |
88 | - $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) { |
|
88 | + $eventManager->attach(CoreForm::EVENT_PREPARE, function (Event $event) use ($collection) { |
|
89 | 89 | $this->setupForm($event->getTarget(), $collection->indexOf($this->newEntry)); |
90 | 90 | }); |
91 | 91 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
120 | - /** |
|
120 | + /** |
|
121 | 121 | * @see \Core\Form\Element\ViewHelperProviderInterface::getViewHelper() |
122 | 122 | */ |
123 | 123 | public function getViewHelper() |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | */ |
222 | 222 | protected function setupForm(CoreForm $form, $key) |
223 | 223 | { |
224 | - $form->setAttribute('action', sprintf('?form=%s', $this->formatAction($key))) |
|
224 | + $form->setAttribute('action', sprintf('?form=%s', $this->formatAction($key))) |
|
225 | 225 | ->setAttribute('data-entry-key', $key) |
226 | 226 | ->setOption('control_buttons', [[ |
227 | 227 | 'class' => 'btn-danger form-collection-container-remove-button', |
@@ -55,8 +55,8 @@ |
||
55 | 55 | { |
56 | 56 | /* @var $options \Applications\Options\ModuleOptions */ |
57 | 57 | $form->get($this->fileName)->setViewHelper('FormImageUpload') |
58 | - ->setMaxSize($options->getContactImageMaxSize()) |
|
59 | - ->setAllowedTypes($options->getContactImageMimeType()) |
|
60 | - ->setForm($form); |
|
58 | + ->setMaxSize($options->getContactImageMaxSize()) |
|
59 | + ->setAllowedTypes($options->getContactImageMimeType()) |
|
60 | + ->setForm($form); |
|
61 | 61 | } |
62 | 62 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | */ |
34 | 34 | public function getUri() |
35 | 35 | { |
36 | - return "/file/Cv.ContactImage/" . $this->id . "/" .urlencode($this->name); |
|
36 | + return "/file/Cv.ContactImage/".$this->id."/".urlencode($this->name); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -44,16 +44,16 @@ |
||
44 | 44 | $this->contact->setImage(null); |
45 | 45 | } |
46 | 46 | |
47 | - /** |
|
48 | - * @param Contact $contact |
|
49 | - * @return ContactImage |
|
50 | - */ |
|
51 | - public function setContact(Contact $contact) |
|
52 | - { |
|
53 | - $this->contact = $contact; |
|
47 | + /** |
|
48 | + * @param Contact $contact |
|
49 | + * @return ContactImage |
|
50 | + */ |
|
51 | + public function setContact(Contact $contact) |
|
52 | + { |
|
53 | + $this->contact = $contact; |
|
54 | 54 | |
55 | - return $this; |
|
56 | - } |
|
55 | + return $this; |
|
56 | + } |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * @return Contact |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * for multiple paths. |
24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
25 | 25 | */ |
26 | - 'paths' => array( __DIR__ . '/../src/Applications/Entity') |
|
26 | + 'paths' => array(__DIR__.'/../src/Applications/Entity') |
|
27 | 27 | ), |
28 | 28 | ), |
29 | 29 | 'eventmanager' => array( |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | 'translation_file_patterns' => array( |
139 | 139 | array( |
140 | 140 | 'type' => 'gettext', |
141 | - 'base_dir' => __DIR__ . '/../language', |
|
141 | + 'base_dir' => __DIR__.'/../language', |
|
142 | 142 | 'pattern' => '%s.mo', |
143 | 143 | ), |
144 | 144 | ), |
@@ -146,16 +146,16 @@ discard block |
||
146 | 146 | // Configure the view service manager |
147 | 147 | 'view_manager' => array( |
148 | 148 | 'template_path_stack' => array( |
149 | - 'Applications' => __DIR__ . '/../view', |
|
149 | + 'Applications' => __DIR__.'/../view', |
|
150 | 150 | ), |
151 | 151 | 'template_map' => array( |
152 | - 'applications/error/not-found' => __DIR__ . '/../view/error/not-found.phtml', |
|
153 | - 'layout/apply' => __DIR__ . '/../view/layout/layout.phtml', |
|
154 | - 'applications/sidebar/manage' => __DIR__ . '/../view/sidebar/manage.phtml', |
|
155 | - 'applications/mail/forward' => __DIR__ . '/../view/mail/forward.phtml', |
|
156 | - 'applications/detail/pdf' => __DIR__ . '/../view/applications/manage/detail.pdf.phtml', |
|
157 | - 'applications/index/disclaimer' => __DIR__ . '/../view/applications/index/disclaimer.phtml', |
|
158 | - 'content/applications-privacy-policy' => __DIR__ . '/../view/applications/index/disclaimer.phtml', |
|
152 | + 'applications/error/not-found' => __DIR__.'/../view/error/not-found.phtml', |
|
153 | + 'layout/apply' => __DIR__.'/../view/layout/layout.phtml', |
|
154 | + 'applications/sidebar/manage' => __DIR__.'/../view/sidebar/manage.phtml', |
|
155 | + 'applications/mail/forward' => __DIR__.'/../view/mail/forward.phtml', |
|
156 | + 'applications/detail/pdf' => __DIR__.'/../view/applications/manage/detail.pdf.phtml', |
|
157 | + 'applications/index/disclaimer' => __DIR__.'/../view/applications/index/disclaimer.phtml', |
|
158 | + 'content/applications-privacy-policy' => __DIR__.'/../view/applications/index/disclaimer.phtml', |
|
159 | 159 | ) |
160 | 160 | ), |
161 | 161 | 'view_helpers' => array( |
@@ -10,20 +10,20 @@ discard block |
||
10 | 10 | |
11 | 11 | return array( |
12 | 12 | 'doctrine' => array( |
13 | - 'driver' => array( |
|
13 | + 'driver' => array( |
|
14 | 14 | 'odm_default' => array( |
15 | 15 | 'drivers' => array( |
16 | 16 | 'Applications\Entity' => 'annotation', |
17 | 17 | ), |
18 | 18 | ), |
19 | 19 | 'annotation' => array( |
20 | - /* |
|
20 | + /* |
|
21 | 21 | * All drivers (except DriverChain) require paths to work on. You |
22 | 22 | * may set this value as a string (for a single path) or an array |
23 | 23 | * for multiple paths. |
24 | 24 | * example https://github.com/doctrine/DoctrineORMModule |
25 | 25 | */ |
26 | - 'paths' => array( __DIR__ . '/../src/Applications/Entity') |
|
26 | + 'paths' => array( __DIR__ . '/../src/Applications/Entity') |
|
27 | 27 | ), |
28 | 28 | ), |
29 | 29 | 'eventmanager' => array( |
@@ -63,16 +63,16 @@ discard block |
||
63 | 63 | 'Applications/Options/ModuleOptions' => 'Applications\Options\ModuleOptions', |
64 | 64 | ), |
65 | 65 | 'factories' => array( |
66 | - 'Applications/Options' => 'Applications\Factory\ModuleOptionsFactory', |
|
67 | - 'ApplicationRepository' => 'Applications\Repository\Service\ApplicationRepositoryFactory', |
|
68 | - 'ApplicationMapper' => 'Applications\Repository\Service\ApplicationMapperFactory', |
|
69 | - 'EducationMapper' => 'Applications\Repository\Service\EducationMapperFactory', |
|
70 | - 'Applications/Listener/ApplicationCreated' => 'Applications\Factory\Listener\EventApplicationCreatedFactory', |
|
71 | - 'Applications/Listener/ApplicationStatusChangePre' => 'Applications\Factory\Listener\StatusChangeFactory', |
|
72 | - 'Applications\Auth\Dependency\ListListener' => 'Applications\Factory\Auth\Dependency\ListListenerFactory' |
|
66 | + 'Applications/Options' => 'Applications\Factory\ModuleOptionsFactory', |
|
67 | + 'ApplicationRepository' => 'Applications\Repository\Service\ApplicationRepositoryFactory', |
|
68 | + 'ApplicationMapper' => 'Applications\Repository\Service\ApplicationMapperFactory', |
|
69 | + 'EducationMapper' => 'Applications\Repository\Service\EducationMapperFactory', |
|
70 | + 'Applications/Listener/ApplicationCreated' => 'Applications\Factory\Listener\EventApplicationCreatedFactory', |
|
71 | + 'Applications/Listener/ApplicationStatusChangePre' => 'Applications\Factory\Listener\StatusChangeFactory', |
|
72 | + 'Applications\Auth\Dependency\ListListener' => 'Applications\Factory\Auth\Dependency\ListListenerFactory' |
|
73 | 73 | ), |
74 | 74 | 'aliases' => [ |
75 | - 'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre' |
|
75 | + 'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre' |
|
76 | 76 | ] |
77 | 77 | ), |
78 | 78 | 'controllers' => array( |
@@ -170,25 +170,25 @@ discard block |
||
170 | 170 | ), |
171 | 171 | 'form_elements' => array( |
172 | 172 | 'invokables' => array( |
173 | - 'Applications/Mail' => 'Applications\Form\Mail', |
|
174 | - 'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset', |
|
175 | - 'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset', |
|
176 | - 'Applications/CommentForm' => 'Applications\Form\CommentForm', |
|
177 | - 'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset', |
|
178 | - 'Applications/Apply' => 'Applications\Form\Apply', |
|
179 | - 'Applications/Contact' => 'Applications\Form\ContactContainer', |
|
180 | - 'Applications/Base' => 'Applications\Form\Base', |
|
181 | - 'Applications/Facts' => 'Applications\Form\Facts', |
|
182 | - 'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset', |
|
183 | - 'Applications/Attributes' => 'Applications\Form\Attributes', |
|
184 | - 'Applications/Filter' => 'Applications\Form\FilterApplication', |
|
185 | - 'href' => 'Applications\Form\Element\Ref', |
|
186 | - ), |
|
173 | + 'Applications/Mail' => 'Applications\Form\Mail', |
|
174 | + 'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset', |
|
175 | + 'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset', |
|
176 | + 'Applications/CommentForm' => 'Applications\Form\CommentForm', |
|
177 | + 'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset', |
|
178 | + 'Applications/Apply' => 'Applications\Form\Apply', |
|
179 | + 'Applications/Contact' => 'Applications\Form\ContactContainer', |
|
180 | + 'Applications/Base' => 'Applications\Form\Base', |
|
181 | + 'Applications/Facts' => 'Applications\Form\Facts', |
|
182 | + 'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset', |
|
183 | + 'Applications/Attributes' => 'Applications\Form\Attributes', |
|
184 | + 'Applications/Filter' => 'Applications\Form\FilterApplication', |
|
185 | + 'href' => 'Applications\Form\Element\Ref', |
|
186 | + ), |
|
187 | 187 | 'factories' => array( |
188 | 188 | 'Applications/ContactImage' => 'Applications\Factory\Form\ContactImageFactory', |
189 | 189 | 'Applications/Attachments' => 'Applications\Factory\Form\AttachmentsFactory', |
190 | 190 | ), |
191 | - ), |
|
191 | + ), |
|
192 | 192 | |
193 | 193 | 'form_elements_config' => array( |
194 | 194 | 'Applications/Apply' => array( |
@@ -60,10 +60,12 @@ |
||
60 | 60 | %s |
61 | 61 | </div>'; |
62 | 62 | |
63 | - foreach ($container as $form) /* @var $form \Zend\Form\Form */ |
|
63 | + foreach ($container as $form) { |
|
64 | + /* @var $form \Zend\Form\Form */ |
|
64 | 65 | { |
65 | 66 | $formsMarkup .= sprintf($formTemplateWrapper, $formContainerHelper->renderElement($form, $layout, $parameter)); |
66 | 67 | } |
68 | + } |
|
67 | 69 | |
68 | 70 | $templateForm = $container->getTemplateForm(); |
69 | 71 | $templateMarkup = sprintf( |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $translator = $this->getTranslator(); |
61 | 61 | $formContainerHelper = $view->formContainer(); |
62 | 62 | $formsMarkup = ''; |
63 | - $formTemplateWrapper = '<div class="form-collection-container-form"> |
|
63 | + $formTemplateWrapper = '<div class="form-collection-container-form"> |
|
64 | 64 | '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button>' : '') . ' |
65 | 65 | %s |
66 | 66 | </div>'; |
@@ -71,16 +71,16 @@ discard block |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | $templateForm = $container->getTemplateForm(); |
74 | - $templateMarkup = sprintf( |
|
74 | + $templateMarkup = sprintf( |
|
75 | 75 | $view->formCollection()->getTemplateWrapper(), |
76 | 76 | $view->escapeHtmlAttr(sprintf($formTemplateWrapper, $formContainerHelper->renderElement($templateForm, $layout, $parameter))) |
77 | 77 | ); |
78 | 78 | |
79 | - return sprintf('<div class="form-collection-container" data-new-entry-key="%s" data-remove-action="%s" data-remove-question="%s"> |
|
79 | + return sprintf('<div class="form-collection-container" data-new-entry-key="%s" data-remove-action="%s" data-remove-question="%s"> |
|
80 | 80 | <h3>%s</h3> |
81 | 81 | %s%s%s |
82 | 82 | </div>', |
83 | - CollectionContainer::NEW_ENTRY, |
|
83 | + CollectionContainer::NEW_ENTRY, |
|
84 | 84 | $container->formatAction('remove'), |
85 | 85 | $translator->translate('Really remove?'), |
86 | 86 | $container->getLabel(), |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | ); |
91 | 91 | } |
92 | 92 | /** |
93 | - * @param boolean $displayRemoveButton |
|
94 | - * @return FormCollectionContainer |
|
93 | + * @param boolean $displayRemoveButton |
|
94 | + * @return FormCollectionContainer |
|
95 | 95 | * @since 0.26 |
96 | - */ |
|
97 | - public function setDisplayRemoveButton($displayRemoveButton) |
|
98 | - { |
|
99 | - $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
96 | + */ |
|
97 | + public function setDisplayRemoveButton($displayRemoveButton) |
|
98 | + { |
|
99 | + $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
100 | 100 | |
101 | - return $this; |
|
102 | - } |
|
101 | + return $this; |
|
102 | + } |
|
103 | 103 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $formContainerHelper = $view->formContainer(); |
62 | 62 | $formsMarkup = ''; |
63 | 63 | $formTemplateWrapper = '<div class="form-collection-container-form"> |
64 | - '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button>' : '') . ' |
|
64 | + '. ($this->displayRemoveButton ? '<button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">'.$translator->translate('Remove').'</button>' : '').' |
|
65 | 65 | %s |
66 | 66 | </div>'; |
67 | 67 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $container->getLabel(), |
87 | 87 | $formsMarkup, |
88 | 88 | $templateMarkup, |
89 | - '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button"><span class="yk-icon yk-icon-plus"></span> ' . sprintf($translator->translate('Add %s'), $container->getLabel()) . '</button></div>' |
|
89 | + '<div class="form-collection-container-add-wrapper"><button type="button" class="btn btn-success form-collection-container-add-button"><span class="yk-icon yk-icon-plus"></span> '.sprintf($translator->translate('Add %s'), $container->getLabel()).'</button></div>' |
|
90 | 90 | ); |
91 | 91 | } |
92 | 92 | /** |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function setDisplayRemoveButton($displayRemoveButton) |
98 | 98 | { |
99 | - $this->displayRemoveButton = (bool)$displayRemoveButton; |
|
99 | + $this->displayRemoveButton = (bool) $displayRemoveButton; |
|
100 | 100 | |
101 | 101 | return $this; |
102 | 102 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | public function init() |
13 | 13 | { |
14 | - // $this->setDescription(/*@translate*/' Where do you want to work tomorrow. This heading gives an immediate overview of your desired next job.'); |
|
14 | + // $this->setDescription(/*@translate*/' Where do you want to work tomorrow. This heading gives an immediate overview of your desired next job.'); |
|
15 | 15 | $this->setIsDescriptionsEnabled(true); |
16 | 16 | parent::init(); |
17 | 17 | } |
@@ -124,9 +124,9 @@ |
||
124 | 124 | public function init() |
125 | 125 | { |
126 | 126 | $this->setName('nativeLanguages') |
127 | - ->setHydrator(new EntityHydrator()) |
|
128 | - ->setObject(new NativeLanguageEntity()) |
|
129 | - ->setLabel('Native Language'); |
|
127 | + ->setHydrator(new EntityHydrator()) |
|
128 | + ->setObject(new NativeLanguageEntity()) |
|
129 | + ->setLabel('Native Language'); |
|
130 | 130 | |
131 | 131 | |
132 | 132 | $this->add( |
@@ -60,11 +60,11 @@ |
||
60 | 60 | protected $skills; |
61 | 61 | |
62 | 62 | /** |
63 | - * Skills |
|
64 | - * |
|
65 | - * @var ArrayCollection |
|
66 | - * @ODM\EmbedMany(targetDocument="\Cv\Entity\Language") |
|
67 | - */ |
|
63 | + * Skills |
|
64 | + * |
|
65 | + * @var ArrayCollection |
|
66 | + * @ODM\EmbedMany(targetDocument="\Cv\Entity\Language") |
|
67 | + */ |
|
68 | 68 | protected $languageSkills; |
69 | 69 | |
70 | 70 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | /** |
189 | - * @return ArrayCollection |
|
189 | + * @return IdentityWrapper |
|
190 | 190 | */ |
191 | 191 | public function getEducationsIndexedById() |
192 | 192 | { |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
218 | - * @return ArrayCollection |
|
218 | + * @return IdentityWrapper |
|
219 | 219 | */ |
220 | 220 | public function getEmploymentsIndexedById() |
221 | 221 | { |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | } |
245 | 245 | |
246 | 246 | /** |
247 | - * @return ArrayCollection |
|
247 | + * @return IdentityWrapper |
|
248 | 248 | */ |
249 | 249 | public function getSkillsIndexedById() |
250 | 250 | { |
@@ -322,7 +322,7 @@ discard block |
||
322 | 322 | } |
323 | 323 | |
324 | 324 | /** |
325 | - * @return ArrayCollection |
|
325 | + * @return IdentityWrapper |
|
326 | 326 | */ |
327 | 327 | public function getLanguageSkillsIndexedById() |
328 | 328 | { |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | } |
361 | 361 | |
362 | 362 | /** |
363 | - * @param Status|string $status |
|
363 | + * @param string $status |
|
364 | 364 | */ |
365 | 365 | public function setStatus($status) |
366 | 366 | { |
@@ -407,6 +407,9 @@ discard block |
||
407 | 407 | } |
408 | 408 | } |
409 | 409 | |
410 | + /** |
|
411 | + * @param UserInterface $oldUser |
|
412 | + */ |
|
410 | 413 | private function updatePermissions($oldUser = null) |
411 | 414 | { |
412 | 415 | $hasPermissions = (bool) $this->permissions; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @var array |
83 | 83 | * @ODM\Collection |
84 | 84 | */ |
85 | - protected $nativeLanguages=[]; |
|
85 | + protected $nativeLanguages = []; |
|
86 | 86 | |
87 | 87 | |
88 | 88 | /** |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function setIsDraft($isDraft) |
269 | 269 | { |
270 | - $this->isDraft=$isDraft; |
|
270 | + $this->isDraft = $isDraft; |
|
271 | 271 | return $this; |
272 | 272 | } |
273 | 273 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | */ |
338 | 338 | public function setNativeLanguages($nativeLanguages) |
339 | 339 | { |
340 | - $this->nativeLanguages=$nativeLanguages; |
|
340 | + $this->nativeLanguages = $nativeLanguages; |
|
341 | 341 | return $this; |
342 | 342 | } |
343 | 343 |