vitart / yii2-widgets
为Yii 2应用程序的Widgets
1.0.1
2015-08-08 18:06 UTC
Requires
- php: >=5.4.0
- yiisoft/yii2: >=2.0.6
This package is auto-updated.
Last update: 2024-09-08 07:05:16 UTC
README
为Yii 2应用程序的Widgets
安装
安装此扩展的首选方式是通过composer。
运行以下命令之一
php composer.phar require --prefer-dist vistart/yii2-widgets "*"
或者在您的composer.json
文件的require部分添加以下内容
"vistart/yii2-widgets": "*"
到
使用
一旦安装了此扩展,只需在代码中通过以下方式使用它
<?= \vistart\Widgets\CnzzWidget::widget([ 'visible' => true, 'cnzzCode' => <the js code of statistical tool>, 'host' => <the hostname which your website just host>, ]); ?>