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']);
Author: Christoph Erdmann (yii2-materializecss@pluspunkt-coding.de)
Inheritance: extends macgyer\yii2materializecss\lib\BaseWidget
Example #1
0
} else {
    $menuItems[] = '<li>' . Html::beginForm(['/site/logout'], 'post') . Html::submitButton('Logout (' . Yii::$app->user->identity->username . ')', ['class' => 'btn btn-flat']) . Html::endForm() . '</li>';
}
echo Nav::widget(['options' => ['class' => 'right'], 'items' => $menuItems]);
NavBar::end();
?>
        </header>

        <main class="content">
            <div class="container">
                <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>

                <?php 
echo Alert::widget();
?>

                <?php 
echo $content;
?>
            </div>
        </main>

        <footer class="footer page-footer">
            <div class="container">
                <div class="row">
                    <div class="col l6 s12">
                        <h5 class="white-text">Footer Content</h5>
                        <p class="grey-text text-lighten-4">You can use rows and columns here to organize your footer content.</p>
                    </div>