PHP Class WPDKDynamicTable

In addition you can drag & drop a single row to sort. ## Overview ## Javascript
Deprecation: since 1.4.10 use WPDKDynamicTableView instead
Author: =undo= ([email protected])
Datei anzeigen Open project: wpxtreme/wpdk

Public Properties

Property Type Description
$sortable boolean Set TRUE for sortable rows

Public Methods

Method Description
__construct ( string $id, array $columns, array $items ) : WPDKDynamicTable Create an instance of WPDKDynamicTable class
display ( ) Display the HTML markup of the dynamic table
html ( ) : string Return the HTML markup for dynamic table
items ( ) : array Get/Set the items list for this dynamic table. If not set parameters this method return the items array.

Private Methods

Method Description
buttonAdd ( ) : string Return the HTML markup to display the add row button.
buttonDelete ( ) : string Return the HTML markup to display the delete row button.
classes ( ) : string Return a string with all additional class
data ( ) : string Return a string with all additional data/attribute
tbody ( ) : string Return the HTML markup for the body of the dynamic table
tbodyRow ( null $item = null ) : string Return the HTML markup with value for the single cel of body table
tfoot ( ) : string return the HTML markup for the footer of dynamic table
thead ( ) : string Return the HTML markup for the head of the Dynamic table

Method Details

__construct() public method

Create an instance of WPDKDynamicTable class
public __construct ( string $id, array $columns, array $items ) : WPDKDynamicTable
$id string ID for this dynamic table
$columns array Key value pairs array with column name and type
$items array Key value pairs array with column and value. Used for preload the table.
return WPDKDynamicTable

display() public method

Display the HTML markup of the dynamic table
public display ( )

html() public method

Return the HTML markup for dynamic table
public html ( ) : string
return string

items() public method

Get/Set the items list for this dynamic table. If not set parameters this method return the items array.
public items ( ) : array
return array

Property Details

$sortable public_oe property

Set TRUE for sortable rows
public bool $sortable
return boolean