项目作者: prawee

项目描述 :
Extends grid classes for Yii2 and Bootstrap 4
高级语言: PHP
项目地址: git://github.com/prawee/yii2-grid.git
创建时间: 2014-07-18T03:49:12Z
项目社区:https://github.com/prawee/yii2-grid

开源协议:

下载


Extends grid classes for Yii2 and Bootstrap 4

Contains

  • ActionAuthColumn
  • ActionChildColumn
  • ActionColumn
  • ActionRuleColumn
  • ImageColumn
  • MediaColumn

Installation

on your terminal run this command

  1. php composer.phar require prawee/yii2-grid "dev-master"

or add to composer.json on require path.

  1. "prawee/yii2-grid": "dev-master"

Usage

ActionColumn

on your grid

  1. ....
  2. [
  3. 'class'=>'prawee\grid\ActionColumn',
  4. ],
  5. .....

ImageColumn

on your grid

  1. ....
  2. [
  3. 'class'=>'prawee\grid\ImageColumn',
  4. 'attribute'=>'image',
  5. 'options'=>[
  6. 'width'=>'40px',
  7. ],
  8. ],
  9. ....

ActionChildColumn

on your grid

  1. ...
  2. [
  3. 'class'=>'prawee\grid\ActionChildColumn',
  4. ],
  5. ...

or it have child that’s support multi param

  1. ...
  2. [
  3. 'class'=>'prawee\grid\ActionChildColumn',
  4. 'params'=>[
  5. 'ref'=>Yii::$app->getRequest()->get('id'),
  6. 'station'=>2,
  7. ],
  8. ],
  9. ...

MediaColumn

on your grid

  1. ....
  2. [
  3. 'class'=>'prawee\grid\MediaColumn',
  4. 'attribute'=>'name',
  5. 'format'=>'image', #image,video
  6. 'options'=>[
  7. 'width'=>'40px',
  8. ],
  9. ],
  10. ....