dizews/yii2-crud-buttons
Composer 安装命令:
composer require dizews/yii2-crud-buttons
包简介
It is a widget for Yii2 framework which control a crud buttons.
README 文档
README
It is a widget for Yii2 framework which control a crud buttons.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist dizews/yii2-crud-buttons "0.1.*"
or add
"dizews/yii2-crud-buttons": "0.1.*"
to the require section of your composer.json.
General Usage
<?= CrudButtons::widget(['model' => isset($model) ? $model : null]); ?>
If you want to get more understandable titles of buttons you should set modelName.
<?= CrudButtons::widget(['model' => isset($model) ? $model : null, 'modelName' => function ($actionId) { $count = 1; if ($actionId == 'multi-update' || $actionId == 'multi-delete') { $count = 10; //any number for plural } return Yii::t('app', '{n, plural, =1{User} other{Users}}', ['n' => $count]) } ]); ?>
统计信息
- 总下载量: 1.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2014-07-24