Abstract Class movTable

Description

movTable abstract class

  • abstract:

Located in /movtable.php (line 37)


	
			
Direct descendents
Class Description
Abstract class movTableDB movTableDB class to generate easily interactive html table from databases supported by pear:db
Variable Summary
 array; $colOrder
 array $columns
 int $count
 mixed $direction
 array $fieldProp
 mixed $filterField
 mixed $filterValue
 array $HTMLoptions
 string $JS
 int $limit
 array $movtable
 int $npages
 mixed $offset
 array $pages
 string $pageurl
 mixed $sort
 array $tdata
Method Summary
 movTable movTable (string $pageurl, array $fieldProp, string $callbackFunc, [array $HTMLoptions = null])
 void doquery ()
 void prinTable (Smarty &$smarty)
 void SetCallBack (function $callbackFunc)
 void setsort ()
Variables
array; $colOrder (line 138)

Contains the order of the columns (only visible columns are included)

array $columns (line 132)

Contains data used to create table headers

['fieldname']['nome']: string - the field name to show

['fieldname']['url']: string - the url to go on click

['fieldname']['sorted']: boolean - TRUE if the field is currently sorted

['fieldname']['direction']: string - Can be 'ASC' for ascending, 'DESC' for descending

['fieldname']['filterable']: boolean - set if field is filterable

int $count (line 50)

The total number of records

int $currentpage (line 70)

Contains the current number of page

string $customfunction (line 161)

Contains the name of the callback function

The callback function is used to generate calculated fields not present in the database. The function receive the current row and it has to return the new row with the new fields The generated fields are not CURRENTLY filterable or sortable

mixed $direction (line 45)
array $fieldProp (line 150)

It contains the property of the fields

['fieldname']['nome']: string - the field name to show

['fieldname']['sortable']: boolean - set if field is sortable

['fieldname']['filterable']: boolean - set if field is filterable

mixed $filterField (line 56)
mixed $filterOption (line 58)
mixed $filterValue (line 57)
array $hiddenFormValues (line 168)

It contains all the parameters to be put as hidden in the form filter

array $HTMLoptions (line 190)

Contains the parameters used in generating the html page

['tableID']='sortable' : table id attribute

['tableClass']='sortable': table class attribute

['baseDir']='': the path to 'jscript' and 'themes' folder

['JSenable']=true: enable/disable javascript

['JScolresize']=true: enable/disable resize of the column

['JScolmove']=true: enable/disable column's movement

['JScolhide']=true: enable/disable hide of the column

['JSlanguage']='locale_EN.js': strings translation file

string $JS (line 75)

Contains the javascript code to be placed in the <head> of the document

int $limit (line 55)

The number of records per page

array $movtable (line 94)

Contains all the data to pass to smarty rendering engine

['table']['columns'] : columns

['table']['tdata'] : tdata

['navigation']['pages'] : pages

['pageurl'] : pageurl

['filter']['hiddenFormValues']: hiddenFormValues

['JS'] : JS

['HTMLoptions']: HTMLoptions

int $npages (line 64)

Contains the total number of pages

mixed $offset (line 45)
array $pages (line 109)

Contains urls for navigation

['first']: string - Url to first page

['next']: string - Url to next page

['previous']: string - Url to previous page

['last']: string - Url to last page

string $pageurl (line 116)

Page URL

mixed $sort (line 45)
array $tdata (line 44)

Contains table data

[row]['fieldname'] : mixed - Table cell

Methods
Constructor movTable (line 201)

movTable constructor

  • abstract:
movTable movTable (string $pageurl, array $fieldProp, string $callbackFunc, [array $HTMLoptions = null])
  • string $pageurl: Url of the page
  • array $fieldProp: Field properties
  • string $callbackFunc: callback function
  • array $HTMLoptions: HTML options
doquery (line 343)
void doquery ()
prinTable (line 223)

This method does the query and assign the values to the smarty variable

  • access: public
void prinTable (Smarty &$smarty)
  • Smarty &$smarty: A smarty object
SetCallBack (line 339)

Set the callback function for the generation of calculated fields

The function must be like:

  1. function callback($tdata)
  2. if ($tdata['field1'] =='value')
  3. return array ("newfield"=>'newvalue',"newfield2"=>'newvalue2');

  • access: public
void SetCallBack (function $callbackFunc)
  • function $callbackFunc: Callback function
setsort (line 346)
void setsort ()

Documentation generated on Tue, 26 Apr 2005 19:06:00 +0200 by phpDocumentor 1.3.0RC3