public static function formActions($actions, $htmlOptions = array())
    {
        self::addCssClass('form-actions', $htmlOptions);
        if (is_array($actions)) {
            $actions = implode(' ', $actions);
        }
        // todo: remove this
        $labelWidthClass = TbArray::popValue('labelWidthClass', $htmlOptions, self::$defaultFormLabelWidthClass);
        $controlWidthClass = TbArray::popValue('controlWidthClass', $htmlOptions, self::$defaultFormControlWidthClass);

        // todo: remove everything that has to do with form layout
        if (TbArray::popValue('formLayout', $htmlOptions, self::FORM_LAYOUT_VERTICAL) == self::FORM_LAYOUT_HORIZONTAL) {
            self::addCssClass(self::switchColToOffset($labelWidthClass), $htmlOptions);
            self::addCssClass(self::switchOffsetToCol($controlWidthClass), $htmlOptions);

            return self::tag('div', array('class' => 'form-group'), self::tag('div', $htmlOptions, $actions));
        } else {
            return self::tag('div', $htmlOptions, $actions);
        }
    }