-
Notifications
You must be signed in to change notification settings - Fork 34
classes_lib_controls_table_databasetable.class
Allows to easily integrate database tables into UI.
Namespace: ScavixWDF\Controls\Table
Implements: ICallable
Extends: Table » Control » Renderable
Subclasses: uiDatabaseTable
Default AddFooter method Creates a table footer with the given keys as text. Uses Table::Footer() internally
Definition: public function AddFooter($keys)
Returns: void
Parameters:
-
array $keys
Array of columns this DatabaseTable contains
Default AddHeader method Creates a table header with the given keys as text. Uses Table::Header() internally
Definition: public function AddHeader($keys)
Returns: void
Parameters:
-
array $keys
Array of columns this DatabaseTable contains
OVERRIDE Table::AddPager and hides $total_items argument
Default AddRow method This will be called for each row to add (from the execution routines). If you override this in derivered classes you can easily react on that. Uses Table::NewRow() internally
Definition: public function AddRow($data)
Returns: void
Parameters:
-
array $data
Row as assaciative array
Allows to assign your own handler to the AddFooter function Sometimes you do not want to inherit from this, but create a table and assign the handlers to another object.
Definition: public function AssignOnAddFooter($handler, $function)
Returns: DatabaseTable $this
Parameters:
-
object $handler
Object containing the handler method -
string $function
Name of the handler method
Allows to assign your own handler to the AddHeader function Sometimes you do not want to inherit from this, but create a table and assign the handlers to another object.
Definition: public function AssignOnAddHeader($handler, $function)
Returns: DatabaseTable $this
Parameters:
-
object $handler
Object containing the handler method -
string $function
Name of the handler method
Allows to assign your own handler to the AddRow function Sometimes you do not want to inherit from this, but create a table and assign the handlers to another object.
Definition: public function AssignOnAddRow($handler, $function)
Returns: DatabaseTable $this
Parameters:
-
object $handler
Object containing the handler method -
string $function
Name of the handler method
OVERRIDE Table::Clear
INTERNAL Currently untested, so marked internal
INTERNAL Builds the SQL query and executed it
Returns the SQL statement used in this table.
Definition: public final function GetSQL()
Returns: string
The SQL statement
Write a log information if querying was slow.
Definition: public function LogIfSlow($min_ms)
Returns: $this
Parameters:
-
int $min_ms
Minimum milliseconds that must be reached to really write info to log
Allows to override the default execute method This will allow you to integrate your own execution handler
Definition: public function OverrideExecuteSql($handler, $function)
Returns: void
Parameters:
-
object $handler
Object containing the handler method -
string $function
Name of handler method
OVERRIDE Calls DatabaseTable::GetData() and loops thru the ResultSet creating the table content before calling Table::PreRender
This is WDF constructor equivalent
Definition: public function __initialize($datasource, $datatype=false, $datatable=false)
Returns: NOT DOCUMENTED
Parameters:
-
DataSource $datasource
DataSource to use -
string $datatype
Datatype to be rendered -
string $datatable
Data tyble to be rendered