src/View/Helper/FormHelper.php
protected function _wrapInputGroup($addonOrButtons) {
        if ($addonOrButtons) {
            $template = 'inputGroupButtons';
            if (is_string($addonOrButtons)) {
                $addonOrButtons = $this->_makeIcon($addonOrButtons);
                if (!Matching::findTagOrAttribute(
                        'button', ['type' => 'submit'], $addonOrButtons)) {
                    $template = 'inputGroupAddons';
                }
            }
            else {
                $addonOrButtons = implode('', $addonOrButtons);
            }
            $addonOrButtons = $this->formatTemplate($template, [
                'content' => $addonOrButtons
            ]);
        }
        return $addonOrButtons;
    }
protected function _wrapInputGroup($addonOrButtons) {
        if ($addonOrButtons) {
            $template = 'inputGroupButtons';
            if (is_string($addonOrButtons)) {
                $addonOrButtons = $this->_makeIcon($addonOrButtons);
                if (!Matching::findTagOrAttribute(
                        'button', ['type' => 'submit'], $addonOrButtons)) {
                    $template = 'inputGroupAddons';
                }
            }
            else {
                $addonOrButtons = implode('', $addonOrButtons);
            }
            $addonOrButtons = $this->formatTemplate($template, [
                'content' => $addonOrButtons
            ]);
        }
        return $addonOrButtons;
    }
protected function _wrapInputGroup ( $ addonOrButtons ) { if ( $ addonOrButtons ) { $ template = 'inputGroupButtons' ; if ( is_string ( $ addonOrButtons ) ) { $ addonOrButtons = $ this -> _makeIcon ( $ addonOrButtons ) ; if ( ! Matching :: findTagOrAttribute ( 'button' , [ 'type' => 'submit' ] , $ addonOrButtons ) ) { $ template = 'inputGroupAddons' ; } } else { $ addonOrButtons = implode ( '' , $ addonOrButtons ) ; } $ addonOrButtons = $ this -> formatTemplate ( $ template , [ 'content' => $ addonOrButtons ] ) ; } return $ addonOrButtons ; }
Wraps the given string corresponding to add-ons or buttons inside a HTML wrapper
element.

If `$addonOrButtons` is an array, it should contains buttons and will be wrapped
accordingly. If `$addonOrButtons` is a string, the wrapper will be chosen depending
on the content (see `_matchButton()`).

@param string|array $addonOrButtons Content to be wrapped or array of buttons to be
wrapped.

@return string The elements wrapped in a suitable HTML element.
Wraps the given string corresponding to add - ons or buttons inside a HTML wrapper element .