2017 © Pedro Peláez
 

library grid

GridView, TreeGrid widgets for Yii2

image

kak/grid

GridView, TreeGrid widgets for Yii2

  • Tuesday, February 6, 2018
  • by sanchezzzhak
  • Repository
  • 2 Watchers
  • 4 Stars
  • 574 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 4 % Grown

The README.md

GridView widgets for Yii2

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

php composer.phar require --prefer-dist kak/grid "*"

Usage

Once the extension is installed, simply use it in your code by :, (*3)

 true,
    'dataProvider' => $provider,
    'sortArrow' => GridView::SORT_ARROW_DIRECTION
    'columns' => [
      'user' => [
          'header' => 'user',
          'format' => 'html',
          'value'  => function($data){
              return '[' . $data->stream_id . '] '
              .  Html::a($data->user->name,['user/update', 'id' => $data->user->id ]);
          }
      ],
      'date_key',
      'os',
      'browser',
      'operator_id' => [
          'header' => 'Operator',
          'value' => 'operator.name'
      ],
      'country_id' => [
          'header' => 'Country',
          'format' => 'html',
          'value'  => function($data){
              return Html::img($data->country->flag_url,['title' => $data->country->name_ru]);
          },
         'footer' =>  'Total redirect',
      ],
      'view_count' => [
          'attribute' => 'view_count',
          'summary' => 'sum'
      ],
      'redirect_count' => [
          'attribute' => 'redirect_count',
          'summary' => 'sum'
      ],
      'ratio (redirect/view)' => [
          'header' => 'Ratio',
          'value' =>  function($data){
              return round( (int)$data->redirect_count/(int)$data->view_count ,2);
          }
      ],
      'actions' => [
          'class' => \yii\grid\ActionColumn::className(),
          'template' => '{view}',
      ],
    ]
])?>

Column types

Behaviors

The Versions

06/02 2018

dev-master

9999999-dev

GridView, TreeGrid widgets for Yii2

  Sources   Download

MIT

The Requires

 

by Tutik Alexsandr

yii2 gridview treegrid

06/02 2018

dev-dev

dev-dev

GridView, TreeGrid widgets for Yii2

  Sources   Download

MIT

The Requires

 

by Tutik Alexsandr

yii2 gridview treegrid

06/02 2018

v1.0.1

1.0.1.0

GridView, TreeGrid widgets for Yii2

  Sources   Download

MIT

The Requires

 

by Tutik Alexsandr

yii2 gridview treegrid

24/01 2017

v1.0.0

1.0.0.0

GridView, TreeGrid widgets for Yii2

  Sources   Download

MIT

The Requires

 

by Tutik Alexsandr

yii2 gridview treegrid