TbHtml::blockAlert PHP Method

blockAlert() public static method

Generates an alert block.
public static blockAlert ( string $color, string $message, array $htmlOptions = [] ) : string
$color string the color of the alert.
$message string the message to display.
$htmlOptions array additional HTML options.
return string the generated alert.
    public static function blockAlert($color, $message, $htmlOptions = array())
    {
        $htmlOptions['block'] = true;
        return self::alert($color, $message, $htmlOptions);
    }

Usage Example

Example #1
0
 public function testBlockAlert()
 {
     $I = $this->codeGuy;
     $html = TbHtml::blockAlert(TbHtml::ALERT_COLOR_WARNING, 'Alert message');
     $alert = $I->createNode($html, 'div.alert');
     $I->seeNodeCssClass($alert, 'alert-warning alert-block fade in');
     $I->seeNodeText($alert, 'Alert message');
     $I->seeNodeChildren($alert, array('div.alert > a[type=button].close'));
 }
All Usage Examples Of TbHtml::blockAlert
TbHtml