@@ -66,8 +66,8 @@ discard block |
||
| 66 | 66 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 67 | 67 | |
| 68 | 68 | return $this->openTag($form) |
| 69 | - . '<div class="row" style="padding: 0 15px;">' |
|
| 70 | - . $content . '</div>' . $this->closeTag(); |
|
| 69 | + . '<div class="row" style="padding: 0 15px;">' |
|
| 70 | + . $content . '</div>' . $this->closeTag(); |
|
| 71 | 71 | |
| 72 | 72 | } |
| 73 | 73 | |
@@ -109,15 +109,15 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | if ($element->getName() == $form->getButtonElement()) { |
| 111 | 111 | $content.='<div class="input-group col-md-' . $cols . '">' |
| 112 | - . $formElement($element) |
|
| 113 | - . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 114 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 115 | - . '</div>'; |
|
| 112 | + . $formElement($element) |
|
| 113 | + . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
|
| 114 | + . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 115 | + . '</div>'; |
|
| 116 | 116 | $buttonsRendered = true; |
| 117 | 117 | } else { |
| 118 | 118 | $content .= '<div class="input-group col-md-' . $cols . '">' |
| 119 | - . $formElement($element) |
|
| 120 | - . '</div>'; |
|
| 119 | + . $formElement($element) |
|
| 120 | + . '</div>'; |
|
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | $i += 1; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 129 | 129 | } |
| 130 | 130 | $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
| 131 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 131 | + . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | return $content; |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * @param array $colMap |
| 35 | 35 | * @return Form|string |
| 36 | 36 | */ |
| 37 | - public function __invoke(FormInterface $form = null, $colMap=null) |
|
| 37 | + public function __invoke(FormInterface $form = null, $colMap = null) |
|
| 38 | 38 | { |
| 39 | 39 | if (!$form) { |
| 40 | 40 | return $this; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | return $this->render($form, $colMap); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - public function render(FormInterface $form, $colMap=null, $buttonsSpan = null) |
|
| 46 | + public function render(FormInterface $form, $colMap = null, $buttonsSpan = null) |
|
| 47 | 47 | { |
| 48 | 48 | $headscript = $this->getView()->plugin('headscript'); |
| 49 | 49 | $basepath = $this->getView()->plugin('basepath'); |
@@ -60,14 +60,14 @@ discard block |
||
| 60 | 60 | $form->prepare(); |
| 61 | 61 | |
| 62 | 62 | if ($form instanceOf ViewPartialProviderInterface) { |
| 63 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 63 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | $content = $this->renderElements($form, $colMap, $buttonsSpan); |
| 67 | 67 | |
| 68 | 68 | return $this->openTag($form) |
| 69 | 69 | . '<div class="row" style="padding: 0 15px;">' |
| 70 | - . $content . '</div>' . $this->closeTag(); |
|
| 70 | + . $content.'</div>'.$this->closeTag(); |
|
| 71 | 71 | |
| 72 | 72 | } |
| 73 | 73 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $content = ''; |
| 79 | 79 | foreach ($buttons as $button) { |
| 80 | - $content.= $helper($button); |
|
| 80 | + $content .= $helper($button); |
|
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | return $content; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
| 87 | 87 | { |
| 88 | 88 | if ($form instanceOf ViewPartialProviderInterface) { |
| 89 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 89 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if (null === $colMap) { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | $formElement = $this->getView()->plugin('formElement'); |
| 97 | - $content = ''; $buttonsRendered = false; $i=0; |
|
| 97 | + $content = ''; $buttonsRendered = false; $i = 0; |
|
| 98 | 98 | foreach ($form as $element) { |
| 99 | 99 | |
| 100 | 100 | if (isset($colMap[$element->getName()])) { |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | if ($element->getName() == $form->getButtonElement()) { |
| 111 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
| 111 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 112 | 112 | . $formElement($element) |
| 113 | 113 | . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
| 114 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 114 | + . $this->renderButtons($form->getButtons()).'</div>' |
|
| 115 | 115 | . '</div>'; |
| 116 | 116 | $buttonsRendered = true; |
| 117 | 117 | } else { |
| 118 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
| 118 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 119 | 119 | . $formElement($element) |
| 120 | 120 | . '</div>'; |
| 121 | 121 | } |
@@ -127,8 +127,8 @@ discard block |
||
| 127 | 127 | if (null === $buttonsSpan) { |
| 128 | 128 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 129 | 129 | } |
| 130 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
| 131 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 130 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
| 131 | + . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>'; |
|
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | return $content; |