2017 © Pedro Peláez
 

library chtmltable

Class for HTML tables

image

kri/chtmltable

Class for HTML tables

  • Sunday, April 26, 2015
  • by KriRin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Build Status Scrutinizer Code Quality Code Coverage, (*1)

HTMLtable

Use HTMLtable to create and show tables with or without pagination., (*2)

This module was made in the course phpmvc. It was made for use with Anax-MVC but can be use in simpler ways too., (*3)


Install in Anax

Add to your composer.json file with require., (*4)

"require": {
    ...
    "kri/chtmltable": "dev-master"
}

Run composer install --no-dev or composer update --no-dev to get kri/chtmltable. It is also possible to test HTMLtable outside of the vendor folder. Copy the table-anax-style.php file to your webroot and point your browser there., (*5)

Usage

First you have to create a table object in your pagecontroller., (*6)

Anax In Anax you can add it with DI like this: di->set('table', '\Kri\HTMLtable\CHTMLtable');, (*7)

Then its ready to be used. The function takes 4 options., (*8)

  • $td is the array with data to generate a table of.
  • $th is an optional array and displays table headings.
  • Next is a optional boolean value if you want to generate pagering true/false, default is false.
  • If you choose to enable pagering the last value is how many rows/indexes to display per page.

Example: $app->table->getTable($td, $th, true, 3) Full example can be found in chtmltable/webroot/page-anax-style.php., (*9)

Outside Anax Another simpler way off adding it is to create the object like this: $table = new kri\HTMLTable\CHTMLTable();, (*10)

Then use it the same way as in Anax: $table->getTable($td, $th, true, 3); Full example can be found in chtmltable/webroot/page-with-table.php and page-with-table-pagering.php., (*11)

About

Requirements

  • PHP 5.4 or above
  • Anax-MVC (for use with Anax)

Author

KriRin, (*12)

License

MIT- See LICENSE.txt file., (*13)

The Versions

26/04 2015

dev-master

9999999-dev https://github.com/KriRin/CHTMLtable

Class for HTML tables

  Sources   Download

MIT

The Requires

  • php >=5.4

 

test html table

26/04 2015

2.0

2.0.0.0 https://github.com/KriRin/CHTMLtable

Class for HTML tables

  Sources   Download

MIT

The Requires

  • php >=5.4

 

test html table

12/04 2015

v1.0

1.0.0.0 https://github.com/KriRin/CHTMLtable

Class for HTML tables

  Sources   Download

MIT

The Requires

  • php >=5.4

 

test html table