PHP Class dmstr\widgets\Alert

php \Yii::$app->getSession()->setFlash('error', 'Alert! Danger alert preview. This alert is dismissable.'); Multiple messages could be set as follows: php \Yii::$app->getSession()->setFlash('error', ['Error 1', 'Error 2']);
Author: Evgeniy Tkachenko ([email protected])
Inheritance: extends yii\bootstrap\Widget
Exibir arquivo Open project: dmstr/yii2-adminlte-asset Class Usage Examples

Public Properties

Property Type Description
$alertTypes the alert types configuration for the flash messages. This array is setup as $key => $value, where: - $key is the name of the session flash variable - $value is the array: - class of alert type (i.e. danger, success, info, warning) - icon for alert AdminLTE
$closeButton the options for rendering the close button tag.
$isAjaxRemoveFlash whether to removed flash messages during AJAX requests

Public Methods

Method Description
init ( ) Initializes the widget.

Method Details

init() public method

This method will register the bootstrap asset bundle. If you override this method, make sure you call the parent implementation first.
public init ( )

Property Details

$alertTypes public_oe property

the alert types configuration for the flash messages. This array is setup as $key => $value, where: - $key is the name of the session flash variable - $value is the array: - class of alert type (i.e. danger, success, info, warning) - icon for alert AdminLTE
public $alertTypes

$closeButton public_oe property

the options for rendering the close button tag.
public $closeButton

$isAjaxRemoveFlash public_oe property

whether to removed flash messages during AJAX requests
public $isAjaxRemoveFlash