jakim-pj/yii2-widgets-adminlte2

AdminLTE2 的 widgets 集合

安装次数: 77

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 0

类型:yii2-extension

1.0.0 2016-08-13 20:00 UTC

This package is auto-updated.

Last update: 2024-09-11 16:46:52 UTC


README

AdminLTE2 的 widgets 集合

安装

安装此扩展的首选方法是通过 composer

运行以下命令之一:

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

或者在您的 composer.json 文件的 require 部分添加:

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

to the require section of your composer.json file.

使用方法

一旦扩展安装完成,只需在您的代码中通过

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