User Tools

Site Tools


table_class

This is an old revision of the document!


Table class

This is a PHP wrapper for the tabulator javascript library and provides an easy way to have data tables.

A basic table

The most basic table is created like:

$table = new Table();
// The setOption function is used to pass options to the javascript tabulator function.
$table->setOption('ajaxUrl', '/url-to-fetch-data');
$table->setOption('columns', array(some column data));
// This renders the necessary html 
$table->render();

Datarecord convenience

One can quickly build a column definition from a datarecord, using the setDefinitionFromDatarecord($classname) function, but the easiest way to interact with Datarecord objects is through Daterecords own renderEditComplex() function.

table_class.1576964623.txt.gz · Last modified: 2019/12/21 21:43 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki