1 | <?php |
||
29 | class Alert extends Widget |
||
30 | { |
||
31 | /** |
||
32 | * @var array the alert types configuration for the flash messages. |
||
33 | * This array is setup as $key => $value, where: |
||
34 | * - $key is the name of the session flash variable |
||
35 | * - $value is the array: |
||
36 | * - class of alert type (i.e. danger, success, info, warning) |
||
37 | * - icon for alert AdminLTE |
||
38 | */ |
||
39 | public $alertTypes = [ |
||
40 | 'error' => [ |
||
41 | 'class' => 'alert-danger', |
||
42 | 'icon' => '<i class="icon fa fa-ban"></i>', |
||
43 | ], |
||
44 | 'danger' => [ |
||
45 | 'class' => 'alert-danger', |
||
46 | 'icon' => '<i class="icon fa fa-ban"></i>', |
||
47 | ], |
||
48 | 'success' => [ |
||
49 | 'class' => 'alert-success', |
||
50 | 'icon' => '<i class="icon fa fa-check"></i>', |
||
51 | ], |
||
52 | 'info' => [ |
||
53 | 'class' => 'alert-info', |
||
54 | 'icon' => '<i class="icon fa fa-info"></i>', |
||
55 | ], |
||
56 | 'warning' => [ |
||
57 | 'class' => 'alert-warning', |
||
58 | 'icon' => '<i class="icon fa fa-warning"></i>', |
||
59 | ], |
||
60 | ]; |
||
61 | |||
62 | /** |
||
63 | * @var array the options for rendering the close button tag. |
||
64 | */ |
||
65 | public $closeButton = [ |
||
66 | 'label' => '<i class="fa fa-times"></i>', |
||
67 | ]; |
||
68 | |||
69 | /** |
||
70 | * Initializes the widget. |
||
71 | * This method will register the bootstrap asset bundle. If you override this method, |
||
72 | * make sure you call the parent implementation first. |
||
73 | */ |
||
74 | public function init() |
||
101 | } |
||
102 |