2017 © Pedro Peláez
 

yii2-extension yii2-gridview-multiheader

An extended gridview widget for Yii 2 with multi headers.

image

ozzyboshi/yii2-gridview-multiheader

An extended gridview widget for Yii 2 with multi headers.

  • Sunday, January 28, 2018
  • by Ozzyboshi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

yii2-gridview-multiheader

A standard yii2 gridview with more than one header, (*1)

Yii2 Gridview Multiheader.

This widget is a Yii 2 extension of the regular Yii2 Gridview widget and allows to build a html table with more than a raw as header., (*2)

Installation

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

Either run, (*4)

composer require ozzyboshi/yii2-gridview-multiheader

or add, (*5)

"ozzyboshi/yii2-gridview-multiheader": "*"

to the require section of your composer.json file., (*6)

In the latter case you want probably to add a psr-4 autoloader to your composer.json file like this, (*7)

"autoload" : {
        "classmap" : [
                "vendor/ozzyboshi/yii2-gridview-multiheader"
            ]
        },

and run composer dumpautoload, (*8)

Usage:

// MyView.php

use ozzyboshi\gridviewmultiheader\GridViewMultiheader as GridViewMultiheader;
...

 ['class' => 'table table-striped',],
  'addingHeaders' => [
      ['' => 1],
      ['Prelievi da enel' => 3],
      ['Delta Prelievi da enel' => 4],
      ['Produzione impianto' => 3],
      ['Delta produzione impianto' => 4],
      ['Immissioni su rete ENEL' => 3],
      ['Delta immissioni su rete ENEL' => 4],
      ['Consumi casa' => 3]
    ],
    'dataProvider' => $dataProvider,
    'showHeader' => true,
    'id' => 'summarytable',
    'columns' => [
      'data',
      'consumofascia1',
      'consumofascia2',
      'consumofascia3',
      'consumodelta1witheuro',
      'consumodelta2witheuro',
      'consumodelta3witheuro',
      'consumodeltatotalewitheuro',
      'produzionefascia1',
      'produzionefascia2',
      'produzionefascia3',
      'produzionedelta1witheuro',
      'produzionedelta2witheuro',
      'produzionedelta3witheuro',
      'produzionedeltatotalewitheuro',
      'immissionefascia1',
      'immissionefascia2',
      'immissionefascia3',
      'immissionedelta1witheuro',
      'immissionedelta2witheuro',
      'immissionedelta3witheuro',
      'immissionedeltatotalewitheuro',
      'consumicasafotovoltaico',
      'consumicasatotali',
      'consumicasapercentuale',
    ],
  ]);
?>

You can see the result of this table at http://lettureenel.ozzyboshi.com, (*9)

The Versions

28/01 2018

dev-master

9999999-dev https://github.com/Ozzyboshi/yii2-GridviewMultiheader

An extended gridview widget for Yii 2 with multi headers.

  Sources   Download

BSD-3-Clause GNU v3

The Requires

 

extension yii2 widget gridview multiheader

28/01 2018

v1.01

1.01.0.0 https://github.com/Ozzyboshi/yii2-GridviewMultiheader

An extended gridview widget for Yii 2 with multi headers.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 widget gridview multiheader

25/04 2016

v1.0

1.0.0.0 https://github.com/Ozzyboshi/yii2-GridviewMultiheader

An extended gridview widget for Yii 2 with multi headers.

  Sources   Download

GNU v3

The Requires

 

extension yii2 widget gridview multiheader