PHP 클래스 macgyer\yii2materializecss\widgets\Alert

All flash messages are displayed in the sequence they were assigned using yii\web\Session::setFlash()-detail). You can set messages as follows: php Yii::$app->session->setFlash('error', 'This is the message'); Yii::$app->session->setFlash('success', 'This is the message'); Yii::$app->session->setFlash('info', 'This is the message'); Multiple messages can be set by specifying an array: php Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']);
저자: Christoph Erdmann ([email protected])
상속: extends macgyer\yii2materializecss\lib\BaseWidget
파일 보기 프로젝트 열기: macgyer/yii2-materializecss 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$alertLevels custom alert levels
$options the HTML attributes for the widget container tag.

보호된 프로퍼티들

프로퍼티 타입 설명
$predefinedAlertLevels the default alert levels. This array is setup as $key => $value, where: - $key is the name of the session flash variable - $value is the alert type (will be uses as CSS class) To define own alert levels and their corresponding CSS classes or to overrride the default levels use [[alertLevels]]

공개 메소드들

메소드 설명
init ( ) Initializes the widget.
run ( ) : string Executes the widget.

비공개 메소드들

메소드 설명
renderHtml ( string $message, array $options = [] ) : string Renders a single flash message.

메소드 상세

init() 공개 메소드

Initializes the widget.
public init ( )

run() 공개 메소드

Executes the widget.
public run ( ) : string
리턴 string the result of widget execution to be outputted.

프로퍼티 상세

$alertLevels 공개적으로 프로퍼티

custom alert levels
public $alertLevels

$options 공개적으로 프로퍼티

the HTML attributes for the widget container tag.
또한 보기: [yii\helpers\BaseHtml::renderTagAttributes()](http://www.yiiframework.com/doc-2.0/yii-helpers-basehtml.html#renderTagAttributes()-detail) for details on how attributes are being rendered.
public $options

$predefinedAlertLevels 보호되어 있는 프로퍼티

the default alert levels. This array is setup as $key => $value, where: - $key is the name of the session flash variable - $value is the alert type (will be uses as CSS class) To define own alert levels and their corresponding CSS classes or to overrride the default levels use [[alertLevels]]
protected $predefinedAlertLevels