Andrew's Web Libraries (AWL)
|
Public Member Functions | |
__construct ( $field, $header="", $align="", $format="", $sql="", $class="", $datatype="", $hook=null) | |
GetTarget () | |
RenderHeader ( $order_field, $order_direction, $browser_array_key=0, $forced_order=false) | |
SetTranslatable () | |
RenderValue ( $value, $extraclass="") | |
Public Attributes | |
$Field | |
$Header | |
$Format | |
$Sql | |
$Align | |
$Class | |
$Type | |
$Translatable | |
$Hook | |
$current_row | |
Definition at line 32 of file classBrowser.php.
BrowserColumn::__construct | ( | $field, | |
$header = "" , |
|||
$align = "" , |
|||
$format = "" , |
|||
$sql = "" , |
|||
$class = "" , |
|||
$datatype = "" , |
|||
$hook = null |
|||
) |
BrowserColumn constructor. Only the first parameter is mandatory.
string | field The name of the column in the SQL result. |
string | header The text to appear in the column header on output ( |
string | align left|center|right - text alignment. Defaults to 'left'. |
string | format A format (a-la-printf) to render data values within. ( |
string | sql Some SQL which will return the desired value to be presented as column 'field' of the result. If this is blank then the column is assumed to be a real data column. | |
string | class Additional classes to apply to the column header and column value cells. | |
string | datatype This will allow 'date' or 'timestamp' to preformat the field correctly before using it in replacements or display. Other types may be added in future. | |
string | $hook | The name of a global function which will preprocess the column value |
The hook function should be defined as follows: function hookfunction( $column_value, $column_name, $database_row ) { ... return $value; }
Definition at line 69 of file classBrowser.php.
BrowserColumn::GetTarget | ( | ) |
GetTarget
Retrieves a 'field' or '...SQL... AS field' definition for the target list of the SQL.
Definition at line 86 of file classBrowser.php.
BrowserColumn::RenderHeader | ( | $order_field, | |
$order_direction, | |||
$browser_array_key = 0 , |
|||
$forced_order = false |
|||
) |
RenderHeader Renders the column header cell for this column. This will be rendered as a
... with class and alignment applied to it. Browser column headers are clickable, and the ordering will also display an 'up' or 'down' triangle with the column header that the SQL is sorted on at the moment.
string | order_field The name of the field currently being sorted on. |
string | order_direction Whether the sort is Ascending or Descending. |
int | browser_array_key Used this to help handle separate ordering of multiple browsers on the same page. |
string | forced_order If true, then we don't allow order to be changed. |
Definition at line 104 of file classBrowser.php.
BrowserColumn::RenderValue | ( | $value, | |
$extraclass = "" |
|||
) |
Definition at line 133 of file classBrowser.php.
BrowserColumn::SetTranslatable | ( | ) |
Definition at line 129 of file classBrowser.php.
BrowserColumn::$Align |
Definition at line 38 of file classBrowser.php.
BrowserColumn::$Class |
Definition at line 39 of file classBrowser.php.
BrowserColumn::$current_row |
Definition at line 43 of file classBrowser.php.
BrowserColumn::$Field |
Definition at line 34 of file classBrowser.php.
BrowserColumn::$Format |
Definition at line 36 of file classBrowser.php.
BrowserColumn::$Header |
Definition at line 35 of file classBrowser.php.
BrowserColumn::$Hook |
Definition at line 42 of file classBrowser.php.
BrowserColumn::$Sql |
Definition at line 37 of file classBrowser.php.
BrowserColumn::$Translatable |
Definition at line 41 of file classBrowser.php.
BrowserColumn::$Type |
Definition at line 40 of file classBrowser.php.