Skip to content

Commit 0ac0037

Browse files
committed
Add _groupTemplate back to call $this->formatTemplate.
1 parent 05ca25c commit 0ac0037

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/View/Helper/BootstrapFormHelper.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,25 @@ public function input($fieldName, array $options = array()) {
393393
return parent::input($fieldName, $options) ;
394394
}
395395

396+
/**
397+
* Generates an group template element
398+
*
399+
* @param array $options The options for group template
400+
* @return string The generated group template
401+
*/
402+
protected function _groupTemplate($options) {
403+
$groupTemplate = $options['options']['type'] . 'FormGroup';
404+
if (!$this->templater()->get($groupTemplate)) {
405+
$groupTemplate = 'formGroup';
406+
}
407+
return $this->formatTemplate($groupTemplate, [
408+
'input' => $options['input'],
409+
'label' => $options['label'],
410+
'error' => $options['error'],
411+
'templateVars' => isset($options['options']['templateVars']) ? $options['options']['templateVars'] : []
412+
]);
413+
}
414+
396415
/**
397416
* Generates an input element
398417
*

0 commit comments

Comments
 (0)