|
12345678910111213141516171819202122232425262728293031 |
- <?php
-
- use yii\helpers\Html;
-
- ?>
-
- <?php if($display && $message): ?>
- <div class="alert alert-<?= $type ?>">
- <?php if($title): ?>
- <h4>
- <?php if($icon): ?>
- <i class="icon fa fa-<?= $icon ?>"></i>
- <?php endif; ?>
- <?= $title ?>
- </h4>
- <?php endif; ?>
- <p>
- <?php if(!$title && $icon): ?>
- <i class="icon fa fa-<?= $icon ?>"></i>
- <?php endif; ?>
- <?php if(is_array($message)): ?>
- <?php foreach($message as $key => $mess): ?>
- <?= nl2br(Html::encode($mess)); ?>
- <?php if($key !== array_key_last($message)): ?><br /><?php endif; ?>
- <?php endforeach; ?>
- <?php else: ?>
- <?= nl2br(Html::encode($message)); ?>
- <?php endif; ?>
- </p>
- </div>
- <?php endif; ?>
|