public function alert($text, $type = null, $options = [])
{
if (is_string($type)) {
$options['type'] = $type;
} else {
if (is_array($type)) {
$options = $type;
}
}
$options += ['type' => $this->config('alert.type')];
$button = $this->tag('button', '×', ['type' => 'button', 'class' => 'close', 'data-dismiss' => 'alert', 'aria-hidden' => true]);
$type = $options['type'];
unset($options['type']);
$options = $this->addClass($options, 'alert');
if ($type) {
$options = $this->addClass($options, 'alert-' . $type);
}
$class = $options['class'];
unset($options['class']);
return $this->div($class, $button . $text, $options);
}