@@ -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,15 +63,15 @@ 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' |
|
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 | 72 | ), |
73 | 73 | 'aliases' => [ |
74 | - 'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre' |
|
74 | + 'Applications/Listener/ApplicationStatusChangePost' => 'Applications/Listener/ApplicationStatusChangePre' |
|
75 | 75 | ] |
76 | 76 | ), |
77 | 77 | 'controllers' => array( |
@@ -169,25 +169,25 @@ discard block |
||
169 | 169 | ), |
170 | 170 | 'form_elements' => array( |
171 | 171 | 'invokables' => array( |
172 | - 'Applications/Mail' => 'Applications\Form\Mail', |
|
173 | - 'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset', |
|
174 | - 'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset', |
|
175 | - 'Applications/CommentForm' => 'Applications\Form\CommentForm', |
|
176 | - 'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset', |
|
177 | - 'Applications/Apply' => 'Applications\Form\Apply', |
|
178 | - 'Applications/Contact' => 'Applications\Form\ContactContainer', |
|
179 | - 'Applications/Base' => 'Applications\Form\Base', |
|
180 | - 'Applications/Facts' => 'Applications\Form\Facts', |
|
181 | - 'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset', |
|
182 | - 'Applications/Attributes' => 'Applications\Form\Attributes', |
|
183 | - 'Applications/Filter' => 'Applications\Form\FilterApplication', |
|
184 | - 'href' => 'Applications\Form\Element\Ref', |
|
185 | - ), |
|
172 | + 'Applications/Mail' => 'Applications\Form\Mail', |
|
173 | + 'Applications/BaseFieldset' => 'Applications\Form\BaseFieldset', |
|
174 | + 'Applications/SettingsFieldset' => 'Applications\Form\SettingsFieldset', |
|
175 | + 'Applications/CommentForm' => 'Applications\Form\CommentForm', |
|
176 | + 'Applications/CommentFieldset' => 'Applications\Form\CommentFieldset', |
|
177 | + 'Applications/Apply' => 'Applications\Form\Apply', |
|
178 | + 'Applications/Contact' => 'Applications\Form\ContactContainer', |
|
179 | + 'Applications/Base' => 'Applications\Form\Base', |
|
180 | + 'Applications/Facts' => 'Applications\Form\Facts', |
|
181 | + 'Applications/FactsFieldset' => 'Applications\Form\FactsFieldset', |
|
182 | + 'Applications/Attributes' => 'Applications\Form\Attributes', |
|
183 | + 'Applications/Filter' => 'Applications\Form\FilterApplication', |
|
184 | + 'href' => 'Applications\Form\Element\Ref', |
|
185 | + ), |
|
186 | 186 | 'factories' => array( |
187 | 187 | 'Applications/ContactImage' => 'Applications\Factory\Form\ContactImageFactory', |
188 | 188 | 'Applications/Attachments' => 'Applications\Factory\Form\AttachmentsFactory', |
189 | 189 | ), |
190 | - ), |
|
190 | + ), |
|
191 | 191 | |
192 | 192 | 'form_elements_config' => array( |
193 | 193 | 'Applications/Apply' => array( |
@@ -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 | } |
227 | 227 | } |
228 | 228 | \ No newline at end of file |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $translator = $this->getTranslator(); |
56 | 56 | $formContainerHelper = $view->formContainer(); |
57 | 57 | $formsMarkup = ''; |
58 | - $formTemplateWrapper = '<div class="form-collection-container-form"> |
|
58 | + $formTemplateWrapper = '<div class="form-collection-container-form"> |
|
59 | 59 | <button type="button" class="btn btn-sm btn-danger pull-right form-collection-container-remove-button">' . $translator->translate('Remove') . '</button> |
60 | 60 | %s |
61 | 61 | </div>'; |
@@ -66,16 +66,16 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | $templateForm = $container->getTemplateForm(); |
69 | - $templateMarkup = sprintf( |
|
69 | + $templateMarkup = sprintf( |
|
70 | 70 | $view->formCollection()->getTemplateWrapper(), |
71 | 71 | $view->escapeHtmlAttr(sprintf($formTemplateWrapper, $formContainerHelper->renderElement($templateForm, $layout, $parameter))) |
72 | 72 | ); |
73 | 73 | |
74 | - return sprintf('<div class="form-collection-container" data-new-entry-key="%s" data-remove-action="%s" data-remove-question="%s"> |
|
74 | + return sprintf('<div class="form-collection-container" data-new-entry-key="%s" data-remove-action="%s" data-remove-question="%s"> |
|
75 | 75 | <h3>%s</h3> |
76 | 76 | %s%s%s |
77 | 77 | </div>', |
78 | - CollectionContainer::NEW_ENTRY, |
|
78 | + CollectionContainer::NEW_ENTRY, |
|
79 | 79 | $container->formatAction('remove'), |
80 | 80 | $translator->translate('Really remove?'), |
81 | 81 | $container->getLabel(), |
@@ -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 | } |
@@ -16,6 +16,6 @@ |
||
16 | 16 | $container = new \Core\Form\CollectionContainer('CvEmploymentForm', new \Cv\Entity\Employment()); |
17 | 17 | $container->setLabel(/*@translate */ 'Employment history'); |
18 | 18 | |
19 | - return $container; |
|
19 | + return $container; |
|
20 | 20 | } |
21 | 21 | } |
@@ -16,6 +16,6 @@ |
||
16 | 16 | $container = new \Core\Form\CollectionContainer('CvEmploymentForm', new \Cv\Entity\Employment()); |
17 | 17 | $container->setLabel(/*@translate */ 'Employment history'); |
18 | 18 | |
19 | - return $container; |
|
19 | + return $container; |
|
20 | 20 | } |
21 | 21 | } |
@@ -32,9 +32,9 @@ |
||
32 | 32 | public function init() |
33 | 33 | { |
34 | 34 | $this->setName('preferredJob') |
35 | - ->setHydrator(new EntityHydrator()) |
|
36 | - ->setObject(new PreferredJob()) |
|
37 | - ->setLabel('Desired Employment'); |
|
35 | + ->setHydrator(new EntityHydrator()) |
|
36 | + ->setObject(new PreferredJob()) |
|
37 | + ->setLabel('Desired Employment'); |
|
38 | 38 | |
39 | 39 | $this->add( |
40 | 40 | array( |
@@ -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( |