public static function alert($color, $message, $htmlOptions = array())
    {
        self::addCssClass('alert', $htmlOptions);
        if (!empty($color)) {
            self::addCssClass('alert-' . $color, $htmlOptions);
        }
        if (TbArray::popValue('in', $htmlOptions, true)) {
            self::addCssClass('in', $htmlOptions);
        }
        if (TbArray::popValue('block', $htmlOptions, false)) {
            self::addCssClass('alert-block', $htmlOptions);
        }
        if (TbArray::popValue('fade', $htmlOptions, true)) {
            self::addCssClass('fade', $htmlOptions);
        }
        $closeText = TbArray::popValue('closeText', $htmlOptions, self::CLOSE_TEXT);
        $closeOptions = TbArray::popValue('closeOptions', $htmlOptions, array());
        $closeOptions['dismiss'] = self::CLOSE_DISMISS_ALERT;
        $output = self::openTag('div', $htmlOptions);
        $output .= $closeText !== false ? self::closeLink($closeText, '#', $closeOptions) : '';
        $output .= $message;
        $output .= '</div>';
        return $output;
    }
public static function alert($color, $message, $htmlOptions = array())
    {
        self::addCssClass('alert', $htmlOptions);
        if (!empty($color)) {
            self::addCssClass('alert-' . $color, $htmlOptions);
        }
        if (TbArray::popValue('in', $htmlOptions, true)) {
            self::addCssClass('in', $htmlOptions);
        }
        if (TbArray::popValue('block', $htmlOptions, false)) {
            self::addCssClass('alert-block', $htmlOptions);
        }
        if (TbArray::popValue('fade', $htmlOptions, true)) {
            self::addCssClass('fade', $htmlOptions);
        }
        $closeText = TbArray::popValue('closeText', $htmlOptions, self::CLOSE_TEXT);
        $closeOptions = TbArray::popValue('closeOptions', $htmlOptions, array());
        $closeOptions['dismiss'] = self::CLOSE_DISMISS_ALERT;
        $output = self::openTag('div', $htmlOptions);
        $output .= $closeText !== false ? self::closeLink($closeText, '#', $closeOptions) : '';
        $output .= $message;
        $output .= '</div>';
        return $output;
    }
public static function alert ( $ color , $ message , $ htmlOptions = array ( ) ) { self :: addCssClass ( 'alert' , $ htmlOptions ) ; if ( ! empty ( $ color ) ) { self :: addCssClass ( 'alert-' . $ color , $ htmlOptions ) ; } if ( TbArray :: popValue ( 'in' , $ htmlOptions , true ) ) { self :: addCssClass ( 'in' , $ htmlOptions ) ; } if ( TbArray :: popValue ( 'block' , $ htmlOptions , false ) ) { self :: addCssClass ( 'alert-block' , $ htmlOptions ) ; } if ( TbArray :: popValue ( 'fade' , $ htmlOptions , true ) ) { self :: addCssClass ( 'fade' , $ htmlOptions ) ; } $ closeText = TbArray :: popValue ( 'closeText' , $ htmlOptions , self :: CLOSE_TEXT ) ; $ closeOptions = TbArray :: popValue ( 'closeOptions' , $ htmlOptions , array ( ) ) ; $ closeOptions [ 'dismiss' ] = self :: CLOSE_DISMISS_ALERT ; $ output = self :: openTag ( 'div' , $ htmlOptions ) ; $ output .= $ closeText !== false ? self :: closeLink ( $ closeText , '#' , $ closeOptions ) : '' ; $ output .= $ message ; $ output .= '</div>' ; return $ output ; }
Generates an alert.
@param string $color the color of the alert.
@param string $message the message to display.
@param array $htmlOptions additional HTML options.
@return string the generated alert.
Generates an alert .