-
Notifications
You must be signed in to change notification settings - Fork 34
classes_lib_controls_table_table.class
An HTML table in DIV notation.
Extends: Control » Renderable
Subclasses: DatabaseTable, uiTable
Adds a data object to the current row. This will be stored for AJAX acceess
Definition: public function AddDataToRow($model)
Returns: static
Parameters:
-
mixed $model
Data object
Adds a new row, takes all arguments given and uses each as new data-cell.
Definition: public function AddNewRow($args)
Returns: static
Parameters:
-
mixed $args
Values for the new row
Same as NewRowGroup($options) but returns $this to allow method chaining.
Definition: public function AddNewRowGroup($options=false)
Returns: static
Parameters:
-
array $options
See TBody for options
Adds a Pager to the table Will be displayed in the tables footer. See Table::SetDataCallback for details how to add data to a paged table.
Definition: public function AddPager($items_per_page, $current_page=false, $max_pages_to_show, $toomany)
Returns: static
Parameters:
-
int $items_per_page
Items per page to be displayed -
int $current_page
One (1) based index of current page -
int $max_pages_to_show
Maximum links to pages to be shown -
mixed $toomany
Catches cases where deprecated method structure is used in call. If present raises an exception.
Adds an action to the current row. This is in fact a little icon displayed on hovering the row. Clicking on it will trigger an AJAX action.
Definition: public function AddRowAction($icon, $label, $handler=false, $method=false)
Returns: static
Parameters:
-
string $icon
Valid uiControl::Icon -
string $label
Action label (alt and tootltip text) -
object|string $handler
Object handling the action -
string $method
Objects method that handles the action
Clears the complete table.
Definition: public function Clear()
Returns: static
Gets the ColGroup definition Creates one if needed.
Definition: public function ColGroup()
Returns: ColGroup The tables ColGroup object
Gets the table footer. Creates one if needed.
Definition: public function Footer($clear=false)
Returns: TFoot The tables footer
Parameters:
-
bool $clear
If true deleted previously set footer
Gets the CellFormat for a column.
Definition: public function GetColFormat($index)
Returns: CellFormat The CellFormat object
Parameters:
-
int $index
Zero based column index
Returns the current row, if any.
Definition: public function GetCurrentRow()
Returns: Tr The current row object or false
Gets the model for a specific row id. Note that $row_id is the id of the Tr object, not the index in the row listing!
Definition: public function GetRowModel($row_id)
Returns: mixed
The data object
Parameters:
-
string $row_id
Id of the Tr object
INTERNAL Will be polled via AJAX to change the page if you defined a pager using DatabaseTable
Gets the table header. Creates one if needed.
Definition: public function Header()
Returns: THead The tables header
Creates a new cell New row will be created if there's not one already.
Definition: public function NewCell($content=false)
Parameters:
-
mixed $content
Content to be added to the cell automatically
Creates a new row. Will be added to the current row group (which wis created if none yet).
Definition: public function NewRow($data=false, $options=false)
Parameters:
-
array $data
Data to be added to the row automatically -
array $options
Rows options, see TBody::NewRow
Creates a new row group and sets it the current Newly created rows will then be added to this group.
Definition: public function NewRowGroup($options=false)
Returns: TBody The row group
Parameters:
-
array $options
See TBody for options
INTERNAL Handles row action clicks and calls the defined handlers (Table::AddRowAction)
INTERNAL Handles the sort-drop event and calls the hanlder (Table::Sortable)
Store this tables current page in the Session.
Definition: public function Persist($name, $storage=null)
Returns: static
Parameters:
-
string $name
A (session-)unique name for the table -
\ScavixWDF\WdfBuffer $storage
Optional external Buffer to use a storage container
OVERRIDE Control::PreRender
Resets the current page to be the first.
Definition: public function ResetPager()
Returns: static
Takes one argument for each (previously set) column possible values: l, r, c (or: left, right, center) as strings sample $tab->SetAlignment('l','l','c','r') when there are 4+ columns to skip a column just pass an empty string: $tab->SetAlignment('l','','','r')
Definition: public function SetAlignment($args)
Returns: static
Parameters:
-
mixed $args
Alignement values
Just sets the caption.
Definition: public function SetCaption($cap)
Returns: static
Parameters:
-
string $cap
Caption text
Sets the format for a specific column.
Definition: public function SetColFormat($index, $format, $blank_if_false=false, $conditional_css)
Returns: static
Parameters:
-
int $index
Zero based column index -
string $format
See CellFormat for explanation -
bool $blank_if_false
If shall be empty if content is false (that may be 0 or '' too) -
array $conditional_css
See CellFormat for explanation
Just sets the culture. This will be used when value are formatted using a CellFormat specified via Table::SetColFormat or Table::SetFormat
Definition: public function SetCulture($ci)
Returns: static
Parameters:
-
CultureInfo $ci
CultureInfo object speficying the culture
Sets a handler to be called whenever the table needs data. Use this in conjuction with Table::AddPager to generate dynamic data.
Definition: public function SetDataCallback($handler, $method)
Returns: static
Parameters:
-
object $handler
Object that will handle the request. -
string $method
Name of the method to be called
Takes all arguments given and uses each as cell-value to add a footer row.
Definition: public function SetFooter($args)
Returns: static
Parameters:
-
mixed $args
Cell-values
Takes one argument for each (previously set) column possible values: see CellFormat class sample $tab->SetFormat('int','f2') when there are 2+ columns to skip a column just pass an empty string: $tab->SetFormat('int','','','f2')
Definition: public function SetFormat($args)
Returns: static
Parameters:
-
mixed $args
Format values
Takes all arguments given and uses each as row-title.
Definition: public function SetHeader($args)
Returns: static
Parameters:
-
mixed $args
Titles
Sets the storage container.
Definition: public function SetStorage($storage)
Returns: void
Parameters:
-
\ScavixWDF\WdfBuffer $storage
Buffer to be used as storage
Sets a sort handler for this table Note: this does not mean that the data can be sorted for display, but that the user may rearrange the rows via mouse drag and drop!
Definition: public function Sortable($handler, $method)
Returns: static
Parameters:
-
object $handler
Object handling the drop -
string $method
Method to be called
OVERRIDE Control::WdfRender
Definition: public function __construct()
Returns: NOT DOCUMENTED