Set of widgets for AdminLTE2, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist jakim-pj/yii2-widgets-adminlte2
or add, (*4)
"jakim-pj/yii2-widgets-adminlte2": "^1.0"
to the require section of your composer.json
file., (*5)
Usage
Once the extension is installed, simply use it in your code by :, (*6)
InfoBox::widget([
'color' => 'bg-green',
'icon' => 'fa-calendar-check-o',
'text' => 'Last Check In',
'number' => [
Yii::$app->formatter->asDatetime($lastCheckIn->start), //line #1
$lastCheckIn->user->fullName // line #2
]
]);
, (*7)
SmallBox::widget([
'color' => 'bg-red',
'icon' => 'fa-exclamation-triangle',
'header' => $formatter->asInteger($incidents),
'text' => 'Total number of incidents',
'footerUrl' => Url::to(['incident/index']),
]);
, (*8)