jakim-pj/yii2-widgets-adminlte2

Set of widgets for AdminLTE2

1.0.0 2016-08-13 20:00 UTC

This package is auto-updated.

Last update: 2024-05-11 16:12:57 UTC


README

Set of widgets for AdminLTE2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist jakim-pj/yii2-widgets-adminlte2

or add

"jakim-pj/yii2-widgets-adminlte2": "^1.0"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

        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
            ]
        ]);

        SmallBox::widget([
            'color' => 'bg-red',
            'icon' => 'fa-exclamation-triangle',
            'header' => $formatter->asInteger($incidents),
            'text' => 'Total number of incidents',
            'footerUrl' => Url::to(['incident/index']),
        ]);