@@ -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( |
@@ -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( |
@@ -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', |
@@ -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 | } |