Bootstrap\View\Helper\BootstrapFormHelper::_getColClass PHP Method

_getColClass() protected method

Return the col size class for the specified column (label, input or error).
protected _getColClass ( $what, $offset = false )
    protected function _getColClass($what, $offset = false)
    {
        if ($what === 'error' && isset($this->colSize['error']) && $this->colSize['error'] == 0) {
            return $this->_getColClass('label', true) . ' ' . $this->_getColClass('input');
        }
        if (isset($this->colSize[$what])) {
            return 'col-md-' . ($offset ? 'offset-' : '') . $this->colSize[$what];
        }
        $classes = [];
        foreach ($this->colSize as $cl => $arr) {
            if (isset($arr[$what])) {
                $classes[] = 'col-' . $cl . '-' . ($offset ? 'offset-' : '') . $arr[$what];
            }
        }
        return implode(' ', $classes);
    }