@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 68 | 68 | |
| 69 | 69 | return $this->openTag($form) |
| 70 | - . '<div class="row" style="padding: 0 15px;">' |
|
| 71 | - . $content . '</div>' . $this->closeTag(); |
|
| 70 | + . '<div class="row" style="padding: 0 15px;">' |
|
| 71 | + . $content . '</div>' . $this->closeTag(); |
|
| 72 | 72 | |
| 73 | 73 | } |
| 74 | 74 | |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | $attrs = $helper->createAttributesString($button->getAttributes()); |
| 83 | 83 | |
| 84 | 84 | $content.= '<button ' . $attrs . '>' |
| 85 | - . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
| 86 | - . '</button>'; |
|
| 85 | + . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
|
| 86 | + . '</button>'; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return $content; |
@@ -120,15 +120,15 @@ discard block |
||
| 120 | 120 | |
| 121 | 121 | if ($element->getName() == $form->getButtonElement()) { |
| 122 | 122 | $content.='<div class="input-group col-md-' . $cols . '">' |
| 123 | - . $formElement($element) |
|
| 124 | - . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 125 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 126 | - . '</div>'; |
|
| 123 | + . $formElement($element) |
|
| 124 | + . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 125 | + . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 126 | + . '</div>'; |
|
| 127 | 127 | $buttonsRendered = true; |
| 128 | 128 | } else { |
| 129 | 129 | $content .= '<div class="input-group col-md-' . $cols . '">' |
| 130 | - . $formElement($element) |
|
| 131 | - . '</div>'; |
|
| 130 | + . $formElement($element) |
|
| 131 | + . '</div>'; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | $i += 1; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 140 | 140 | } |
| 141 | 141 | $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
| 142 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 142 | + . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | return $content; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | * @param array $colMap |
| 36 | 36 | * @return Form|string |
| 37 | 37 | */ |
| 38 | - public function __invoke(FormInterface $form = null, $colMap=null) |
|
| 38 | + public function __invoke(FormInterface $form = null, $colMap = null) |
|
| 39 | 39 | { |
| 40 | 40 | if (!$form) { |
| 41 | 41 | return $this; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return $this->render($form, $colMap); |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - public function render(FormInterface $form, $colMap=null, $buttonsSpan = null) |
|
| 47 | + public function render(FormInterface $form, $colMap = null, $buttonsSpan = null) |
|
| 48 | 48 | { |
| 49 | 49 | $headscript = $this->getView()->plugin('headscript'); |
| 50 | 50 | $basepath = $this->getView()->plugin('basepath'); |
@@ -61,14 +61,14 @@ discard block |
||
| 61 | 61 | $form->prepare(); |
| 62 | 62 | |
| 63 | 63 | if ($form instanceOf ViewPartialProviderInterface) { |
| 64 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 64 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 68 | 68 | |
| 69 | 69 | return $this->openTag($form) |
| 70 | 70 | . '<div class="row" style="padding: 0 15px;">' |
| 71 | - . $content . '</div>' . $this->closeTag(); |
|
| 71 | + . $content.'</div>'.$this->closeTag(); |
|
| 72 | 72 | |
| 73 | 73 | } |
| 74 | 74 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $button->removeAttribute('name'); |
| 82 | 82 | $attrs = $helper->createAttributesString($button->getAttributes()); |
| 83 | 83 | |
| 84 | - $content.= '<button ' . $attrs . '>' |
|
| 84 | + $content .= '<button '.$attrs.'>' |
|
| 85 | 85 | . $this->getTranslator()->translate($button->getLabel(), $this->getTranslatorTextDomain()) |
| 86 | 86 | . '</button>'; |
| 87 | 87 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
| 93 | 93 | { |
| 94 | 94 | if ($form instanceOf ViewPartialProviderInterface) { |
| 95 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 95 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | if (null === $colMap) { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $formElement = $this->getView()->plugin('formElement'); |
| 103 | - $content = ''; $buttonsRendered = false; $i=0; |
|
| 103 | + $content = ''; $buttonsRendered = false; $i = 0; |
|
| 104 | 104 | foreach ($form as $element) { |
| 105 | 105 | |
| 106 | 106 | if ($element instanceOf Hidden) { |
@@ -119,14 +119,14 @@ discard block |
||
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if ($element->getName() == $form->getButtonElement()) { |
| 122 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
| 122 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 123 | 123 | . $formElement($element) |
| 124 | 124 | . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
| 125 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 125 | + . $this->renderButtons($form->getButtons()).'</div>' |
|
| 126 | 126 | . '</div>'; |
| 127 | 127 | $buttonsRendered = true; |
| 128 | 128 | } else { |
| 129 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
| 129 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 130 | 130 | . $formElement($element) |
| 131 | 131 | . '</div>'; |
| 132 | 132 | } |
@@ -138,8 +138,8 @@ discard block |
||
| 138 | 138 | if (null === $buttonsSpan) { |
| 139 | 139 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 140 | 140 | } |
| 141 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
| 142 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 141 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
| 142 | + . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>'; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | return $content; |