protected function buildInputGroup()
    {
        $props = $this->props;
        if ($props['tagOnly']) {
            return $props['input'];
        }
        if (!$props['addonBefore'] && !$props['addonAfter']) {
            return $props['input'];
        }
        if ($props['addonBefore']) {
            $addonClass = \preg_match('#<(a|button)\b#i', $props['addonBefore'])
                ? 'input-group-btn'
                : 'input-group-addon';
            $props['addonBefore'] = '<span class="'.$addonClass.'">'.$props['addonBefore'].'</span>';
        }
        if ($props['addonAfter']) {
            $addonClass = \preg_match('#<(a|button)\b#i', $props['addonAfter'])
                ? 'input-group-btn'
                : 'input-group-addon';
            $props['addonAfter'] = '<span class="'.$addonClass.'">'.$props['addonAfter'].'</span>';
        }
        // since default attribsInputGroup didn't exist it's a bit cumbersome to merge here
        $propsInputGroup = $this->mergeProps(array(
            array(
                'attribs' => array( 'class' => 'input-group' ), // name, type, & other "global" attributes
            ),
            array(
                'attribs' => isset($props['attribsInputGroup'])
                    ? $props['attribsInputGroup']
                    : array(),
            ),
        ));
        $attribsInputGroup = $propsInputGroup['attribs'];
        return '<div'.Html::buildAttribString($attribsInputGroup).'>'."\n"
                .$props['addonBefore']."\n"
                .$props['input']."\n"
                .$props['addonAfter']."\n"
            .'</div>';
    }