@@ -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 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | $content = ''; |
| 80 | 80 | foreach ($buttons as $button) { |
| 81 | - $content.= $helper($button); |
|
| 81 | + $content .= $helper($button); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return $content; |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | public function renderElements($form, $colMap = null, $buttonsSpan = null) |
| 88 | 88 | { |
| 89 | 89 | if ($form instanceOf ViewPartialProviderInterface) { |
| 90 | - return $this->getView()->partial($form->getViewPartial(), [ 'element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan ]); |
|
| 90 | + return $this->getView()->partial($form->getViewPartial(), ['element' => $form, 'colMap' => $colMap, 'buttonsSpan' => $buttonsSpan]); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if (null === $colMap) { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $formElement = $this->getView()->plugin('formElement'); |
| 98 | - $content = ''; $buttonsRendered = false; $i=0; |
|
| 98 | + $content = ''; $buttonsRendered = false; $i = 0; |
|
| 99 | 99 | foreach ($form as $element) { |
| 100 | 100 | |
| 101 | 101 | if ($element instanceOf Hidden) { |
@@ -114,14 +114,14 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | if ($element->getName() == $form->getButtonElement()) { |
| 117 | - $content.='<div class="input-group col-md-' . $cols . '">' |
|
| 117 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 118 | 118 | . $formElement($element) |
| 119 | 119 | . '<div class="input-group-btn search-form-buttons" style="width: 1px;">' |
| 120 | - . $this->renderButtons($form->getButtons()) . '</div>' |
|
| 120 | + . $this->renderButtons($form->getButtons()).'</div>' |
|
| 121 | 121 | . '</div>'; |
| 122 | 122 | $buttonsRendered = true; |
| 123 | 123 | } else { |
| 124 | - $content .= '<div class="input-group col-md-' . $cols . '">' |
|
| 124 | + $content .= '<div class="input-group col-md-'.$cols.'">' |
|
| 125 | 125 | . $formElement($element) |
| 126 | 126 | . '</div>'; |
| 127 | 127 | } |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | if (null === $buttonsSpan) { |
| 134 | 134 | $buttonsSpan = $form->getOption('buttons_span') ?: 12; |
| 135 | 135 | } |
| 136 | - $content .= '<div class="input-group search-form-buttons col-md-' . $buttonsSpan . ' text-right">' |
|
| 137 | - . '<div class="btn-group">' . $this->renderButtons($form->getButtons()) .'</div></div>'; |
|
| 136 | + $content .= '<div class="input-group search-form-buttons col-md-'.$buttonsSpan.' text-right">' |
|
| 137 | + . '<div class="btn-group">'.$this->renderButtons($form->getButtons()).'</div></div>'; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | return $content; |