eddmash/yii2-transpose-dataprovider

A Yii2 data provider that transpose data into a table format

v1.0.1 2016-11-11 08:31 UTC

This package is auto-updated.

Last update: 2024-05-13 09:49:25 UTC


README

A Yii2 data provider that transpose data into a table format

Installation

The preferred way to install this extension is through composer.

Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

Either run

$ php composer.phar require eddmash/transposedataprovider "@dev"

or add

"eddmash/transposedataprovider": "@dev"

to the require section of your composer.json file.

Usage

use Eddmash\TransposeDataProvider;

$dataProvider = new TransposeDataProvider([
    'query'=>$dataQuery,
    'groupField'=>'rowid',
    'columnsField'=>'columns.column_name',
    'valuesField'=>'data',
    'extraFields'=>['call_data_id', 'instance.name'],
    'pagination'=>[
        'pageSize'=>4
    ]
]);

Learn more yii2-transpose-dataprovider documentation