public function render(array $aButtons, array $aButtonGroupOptions = null)
    {
        /*
         * Button group container attributes
         */
        if (empty($aButtonGroupOptions['attributes'])) {
            $aButtonGroupOptions['attributes'] = array('class' => 'btn-group');
        } else {
            if (!is_array($aButtonGroupOptions['attributes'])) {
                throw new LogicException('"attributes" option expects an array, "' . gettype($aButtonGroupOptions['attributes']) . '" given');
            }
            if (empty($aButtonGroupOptions['attributes']['class'])) {
                $aButtonGroupOptions['attributes']['class'] = 'btn-group';
            } elseif (!preg_match('/(\s|^)(?:btn-group|btn-group-vertical)(\s|$)/', $aButtonGroupOptions['attributes']['class'])) {
                $aButtonGroupOptions['attributes']['class'] .= ' btn-group';
            }
        }

        /*
         * Render button group
         */
        return sprintf(
            static::$buttonGroupContainerFormat,
            //Container attributes
            $this->createAttributesString($aButtonGroupOptions['attributes']),
            //Buttons
            $this->renderButtons(
                $aButtons,
                strpos($aButtonGroupOptions['attributes']['class'], 'btn-group-justified') !== false
            )
        );
    }