Trait kartik\alert\AlertTrait

Implemented bykartik\alert\Alert, kartik\widgets\Alert
Available since version1.0

AlertTrait contains properties for usage by kartik\alert\Bs5Alert, kartik\alert\Bs4Alert and kartik\alert\Bs3Alert widgets.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$delay integer The delay in microseconds after which the alert will be displayed. kartik\alert\AlertTrait
$icon string The class name for the icon to be displayed. kartik\alert\AlertTrait
$iconOptions array The HTML attributes for the icon. kartik\alert\AlertTrait
$iconType string The icon type. kartik\alert\AlertTrait
$showSeparator boolean Show the title separator. kartik\alert\AlertTrait
$title string The title for the alert. kartik\alert\AlertTrait
$titleOptions array The HTML attributes for the title. kartik\alert\AlertTrait
$type string The type of the alert to be displayed. kartik\alert\AlertTrait

Property Details

$delay public property

The delay in microseconds after which the alert will be displayed. Will be useful when multiple alerts are to be shown.

public integer $delay null
$icon public property

The class name for the icon to be displayed. If set to empty or null, will not be displayed.

public string $icon null
$iconOptions public property

The HTML attributes for the icon.

public array $iconOptions null
$iconType public property

The icon type. Can be either 'class' or 'image'. Defaults to 'class'.

public string $iconType null
$showSeparator public property

Show the title separator. Only applicable if $title is set.

public boolean $showSeparator null
$title public property

The title for the alert. If set to empty or null, will not be displayed.

public string $title null
$titleOptions public property

The HTML attributes for the title. The following options are additionally recognized:

  • tag: string, the HTML tag to render the title. Defaults to span.
public array $titleOptions null
$type public property

The type of the alert to be displayed. One of the TYPE_ constants.

public string $type null