@@ -24,8 +24,8 @@ |
||
| 24 | 24 | public function init() |
| 25 | 25 | { |
| 26 | 26 | $this->setName('education') |
| 27 | - ->setHydrator(new EntityHydrator()) |
|
| 28 | - ->setObject(new EducationEntity()); |
|
| 27 | + ->setHydrator(new EntityHydrator()) |
|
| 28 | + ->setObject(new EducationEntity()); |
|
| 29 | 29 | |
| 30 | 30 | $this->add( |
| 31 | 31 | array( |
@@ -52,8 +52,8 @@ |
||
| 52 | 52 | public function init() |
| 53 | 53 | { |
| 54 | 54 | $this->setName('preferredJob') |
| 55 | - ->setHydrator(new EntityHydrator()) |
|
| 56 | - ->setObject(new PreferredJob()); |
|
| 55 | + ->setHydrator(new EntityHydrator()) |
|
| 56 | + ->setObject(new PreferredJob()); |
|
| 57 | 57 | |
| 58 | 58 | $this->add( |
| 59 | 59 | array( |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $this->add([ |
| 28 | 28 | 'name' => 'endDate', |
| 29 | - 'required' => ! $data['currentIndicator'] |
|
| 29 | + 'required' => !$data['currentIndicator'] |
|
| 30 | 30 | ]); |
| 31 | 31 | |
| 32 | 32 | return parent::setData($data); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | { |
| 27 | 27 | $this->add([ |
| 28 | 28 | 'name' => 'endDate', |
| 29 | - 'required' => ! $data['currentIndicator'] |
|
| 29 | + 'required' => !$data['currentIndicator'] |
|
| 30 | 30 | ]); |
| 31 | 31 | |
| 32 | 32 | return parent::setData($data); |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | public function init() |
| 25 | 25 | { |
| 26 | 26 | $this->setName('employment') |
| 27 | - ->setHydrator(new EntityHydrator()) |
|
| 28 | - ->setObject(new EmploymentEntity()); |
|
| 27 | + ->setHydrator(new EntityHydrator()) |
|
| 28 | + ->setObject(new EmploymentEntity()); |
|
| 29 | 29 | |
| 30 | 30 | $this->add( |
| 31 | 31 | array( |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | * for multiple paths. |
| 16 | 16 | * example https://github.com/doctrine/DoctrineORMModule |
| 17 | 17 | */ |
| 18 | - 'paths' => array( __DIR__ . '/../src/Cv/Entity'), |
|
| 18 | + 'paths' => array(__DIR__.'/../src/Cv/Entity'), |
|
| 19 | 19 | ), |
| 20 | 20 | ), |
| 21 | 21 | 'eventmanager' => array( |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | 'translation_file_patterns' => array( |
| 37 | 37 | array( |
| 38 | 38 | 'type' => 'gettext', |
| 39 | - 'base_dir' => __DIR__ . '/../language', |
|
| 39 | + 'base_dir' => __DIR__.'/../language', |
|
| 40 | 40 | 'pattern' => '%s.mo', |
| 41 | 41 | ), |
| 42 | 42 | ), |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | 'resume-recruiter' => array( |
| 167 | 167 | 'label' => /*@translate*/ 'Talent-Pool', |
| 168 | 168 | 'route' => 'lang/cvs', |
| 169 | - 'active_on' => [ 'lang/cvs/edit', 'lang/cvs/view' ], |
|
| 169 | + 'active_on' => ['lang/cvs/edit', 'lang/cvs/view'], |
|
| 170 | 170 | 'resource' => 'navigation/resume-recruiter', |
| 171 | 171 | 'order' => 10, |
| 172 | 172 | 'pages' => array( |
@@ -194,15 +194,15 @@ discard block |
||
| 194 | 194 | |
| 195 | 195 | // Map template to files. Speeds up the lookup through the template stack. |
| 196 | 196 | 'template_map' => array( |
| 197 | - 'cv/form/employment.view' => __DIR__ . '/../view/cv/form/employment.view.phtml', |
|
| 198 | - 'cv/form/employment.form' => __DIR__ . '/../view/cv/form/employment.form.phtml', |
|
| 199 | - 'cv/form/education.view' => __DIR__ . '/../view/cv/form/education.view.phtml', |
|
| 200 | - 'cv/form/education.form' => __DIR__ . '/../view/cv/form/education.form.phtml' |
|
| 197 | + 'cv/form/employment.view' => __DIR__.'/../view/cv/form/employment.view.phtml', |
|
| 198 | + 'cv/form/employment.form' => __DIR__.'/../view/cv/form/employment.form.phtml', |
|
| 199 | + 'cv/form/education.view' => __DIR__.'/../view/cv/form/education.view.phtml', |
|
| 200 | + 'cv/form/education.form' => __DIR__.'/../view/cv/form/education.form.phtml' |
|
| 201 | 201 | ), |
| 202 | 202 | |
| 203 | 203 | // Where to look for view templates not mapped above |
| 204 | 204 | 'template_path_stack' => array( |
| 205 | - __DIR__ . '/../view', |
|
| 205 | + __DIR__.'/../view', |
|
| 206 | 206 | ), |
| 207 | 207 | ), |
| 208 | 208 | |
@@ -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', |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $renderer->headscript()->appendFile($renderer->basePath('Core/js/jquery.summary-form.js')); |
| 68 | 68 | |
| 69 | 69 | $label = $form->getLabel(); |
| 70 | - $labelContent = $label ? '<div class="sf-headline"><h3>' . $this->getView()->translate($label) . '</h3></div>' : ''; |
|
| 70 | + $labelContent = $label ? '<div class="sf-headline"><h3>'.$this->getView()->translate($label).'</h3></div>' : ''; |
|
| 71 | 71 | $formContent = $this->renderForm($form, $layout, $parameter); |
| 72 | 72 | $summaryContent = $this->renderSummary($form); |
| 73 | 73 | |
@@ -131,8 +131,8 @@ discard block |
||
| 131 | 131 | public function renderForm(SummaryFormInterface $form, $layout = Form::LAYOUT_HORIZONTAL, $parameter = array()) |
| 132 | 132 | { |
| 133 | 133 | /* @var $form SummaryFormInterface|\Core\Form\SummaryForm */ |
| 134 | - $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
| 135 | - $formHelper = $renderer->plugin('form'); /* @var $formHelper \Core\Form\View\Helper\Form */ |
|
| 134 | + $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
| 135 | + $formHelper = $renderer->plugin('form'); /* @var $formHelper \Core\Form\View\Helper\Form */ |
|
| 136 | 136 | $fieldset = $form->getBaseFieldset(); |
| 137 | 137 | $resetPartial = false; |
| 138 | 138 | |
@@ -166,11 +166,11 @@ discard block |
||
| 166 | 166 | $form->prepare(); |
| 167 | 167 | $baseFieldset = $form->getBaseFieldset(); |
| 168 | 168 | if (!isset($baseFieldset)) { |
| 169 | - throw new \InvalidArgumentException('For the Form ' . get_class($form) . ' there is no Basefieldset'); |
|
| 169 | + throw new \InvalidArgumentException('For the Form '.get_class($form).' there is no Basefieldset'); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | $dataAttributesMarkup = ''; |
| 173 | - $dataAttributes = array_filter($form->getAttributes(), function ($key) { |
|
| 173 | + $dataAttributes = array_filter($form->getAttributes(), function($key) { |
|
| 174 | 174 | return preg_match('/^data-/', $key); |
| 175 | 175 | }, ARRAY_FILTER_USE_KEY); |
| 176 | 176 | |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | $dataAttributesMarkup .= sprintf(' %s="%s"', $dataKey, $dataValue); |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | - $markup = '<div class="panel panel-default" style="min-height: 100px;"' . $dataAttributesMarkup . '> |
|
| 182 | + $markup = '<div class="panel panel-default" style="min-height: 100px;"'.$dataAttributesMarkup.'> |
|
| 183 | 183 | <div class="panel-body"><div class="sf-controls">%s</div>%s</div></div>'; |
| 184 | 184 | |
| 185 | 185 | $view = $this->getView(); |
@@ -192,9 +192,9 @@ discard block |
||
| 192 | 192 | |
| 193 | 193 | if (($controlButtons = $form->getOption('control_buttons')) !== null) |
| 194 | 194 | { |
| 195 | - $buttonMarkup .= PHP_EOL . implode(PHP_EOL, array_map(function (array $buttonSpec) use ($view) { |
|
| 196 | - return '<button type="button" class="btn btn-default btn-xs' . (isset($buttonSpec['class']) ? ' ' . $buttonSpec['class'] : '') . '">' |
|
| 197 | - . (isset($buttonSpec['icon']) ? '<span class="yk-icon yk-icon-' . $buttonSpec['icon'] . '"></span> ' : '') |
|
| 195 | + $buttonMarkup .= PHP_EOL.implode(PHP_EOL, array_map(function(array $buttonSpec) use ($view) { |
|
| 196 | + return '<button type="button" class="btn btn-default btn-xs'.(isset($buttonSpec['class']) ? ' '.$buttonSpec['class'] : '').'">' |
|
| 197 | + . (isset($buttonSpec['icon']) ? '<span class="yk-icon yk-icon-'.$buttonSpec['icon'].'"></span> ' : '') |
|
| 198 | 198 | . $view->translate($buttonSpec['label']) |
| 199 | 199 | . '</button>'; |
| 200 | 200 | }, $controlButtons)); |
@@ -234,10 +234,10 @@ discard block |
||
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | if ($element instanceof ViewPartialProviderInterface) { |
| 237 | - $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
| 237 | + $renderer = $this->getView(); /* @var $renderer \Zend\View\Renderer\PhpRenderer */ |
|
| 238 | 238 | $origPartial = $element->getViewPartial(); |
| 239 | 239 | $partial = "$origPartial.view"; |
| 240 | - $partialParams = array( |
|
| 240 | + $partialParams = array( |
|
| 241 | 241 | 'element' => $element |
| 242 | 242 | ); |
| 243 | 243 | if (!$renderer->resolver($partial)) { |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | |
| 254 | 254 | if ($element instanceof FieldsetInterface) { |
| 255 | 255 | if (!$element instanceof FormInterface && $label) { |
| 256 | - $markup .= '<h4>' . $label . '</h4>'; |
|
| 256 | + $markup .= '<h4>'.$label.'</h4>'; |
|
| 257 | 257 | } |
| 258 | 258 | foreach ($element as $el) { |
| 259 | 259 | $markup .= $this->renderSummaryElement($el); |
@@ -289,9 +289,9 @@ discard block |
||
| 289 | 289 | $elementValue = []; |
| 290 | 290 | $numberOfmultiOptions = count($multiOptions); |
| 291 | 291 | foreach ($multiOptions as $optGroupLabel => $vals) { |
| 292 | - $elementValue[] = ($numberOfmultiOptions > 1 || $optGroupLabel !== $generalOptGroupName ? "<b>$optGroupLabel</b><br>" : '') . join(', ', $vals); |
|
| 292 | + $elementValue[] = ($numberOfmultiOptions > 1 || $optGroupLabel !== $generalOptGroupName ? "<b>$optGroupLabel</b><br>" : '').join(', ', $vals); |
|
| 293 | 293 | } |
| 294 | - $elementValue = join('<br>', $elementValue) . '<br>'; |
|
| 294 | + $elementValue = join('<br>', $elementValue).'<br>'; |
|
| 295 | 295 | |
| 296 | 296 | } else { |
| 297 | 297 | $elementValue = $translator->translate($options[$elementValue]); |
@@ -305,10 +305,10 @@ discard block |
||
| 305 | 305 | $markup .= '<div class="row">'; |
| 306 | 306 | $col = 12; |
| 307 | 307 | if ($label) { |
| 308 | - $markup .= '<div class="col-md-3 yk-label"><label>' . $label . '</label></div>'; |
|
| 308 | + $markup .= '<div class="col-md-3 yk-label"><label>'.$label.'</label></div>'; |
|
| 309 | 309 | $col = 9; |
| 310 | 310 | } |
| 311 | - $markup .= '<div class="col-md-' . $col . '">' . $elementValue . '</div>' |
|
| 311 | + $markup .= '<div class="col-md-'.$col.'">'.$elementValue.'</div>' |
|
| 312 | 312 | . '</div>'; |
| 313 | 313 | return $markup; |
| 314 | 314 | } |
@@ -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 | } |