Overview

Packages

  • awl
    • AuthPlugin
    • AwlDatabase
    • Browser
    • classEditor
    • DataEntry
    • DataUpdate
    • EMail
    • iCalendar
    • MenuSet
    • PgQuery
    • Session
    • Translation
    • User
    • Utilities
    • Validation
    • vCalendar
    • vComponent
    • XMLDocument
    • XMLElement
  • None

Classes

  • Browser
  • BrowserColumn
  • Overview
  • Package
  • Class

Class BrowserColumn

BrowserColumns are the basic building blocks. You can specify just the field name, and the column header or you can get fancy and specify an alignment, format string, SQL formula and cell CSS class.

Package: awl\Browser
Copyright: Catalyst IT Ltd, Morphoss Ltd http://www.morphoss.com/
License: GNU GPL v2 or later
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at classBrowser.php
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.

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.

Parameters

$order_field
The name of the field currently being sorted on.
$order_direction
Whether the sort is Ascending or Descending.
$browser_array_key

Used this to help handle separate ordering of multiple browsers on the same page.

$forced_order
If true, then we don't allow order to be changed.
Methods summary
public
# BrowserColumn( string $field, string $header = "", string $align = "", string $format = "", string $sql = "", string $class = "", string $datatype = "", string $hook = null )

BrowserColumn constructor. Only the first parameter is mandatory.

BrowserColumn constructor. Only the first parameter is mandatory.

Parameters

$field
The name of the column in the SQL result.
$header

The text to appear in the column header on output (@see BrowserColumn::RenderHeader()). If this is not supplied then a default of the field name will be used.

$align
left|center|right - text alignment. Defaults to 'left'.
$format

A format (a-la-printf) to render data values within. (@see BrowserColumn::RenderValue()). If this is not supplied then the default will ensure the column value is displayed as-is.

$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.

$class
Additional classes to apply to the column header and column value cells.
$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.

$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; }

public
# GetTarget( )

GetTarget

GetTarget

Retrieves a 'field' or '...SQL... AS field' definition for the target list of the SQL.

public
# RenderHeader( string $order_field, string $order_direction, integer $browser_array_key = 0, string $forced_order = false )

RenderHeader Renders the column header cell for this column. This will be rendered as a

... ...
public
# SetTranslatable( )
public
# RenderValue( $value, $extraclass = "" )
Properties summary
public $Field
#
public $Header
#
public $Format
#
public $Sql
#
public $Align
#
public $Class
#
public $Type
#
public $Translatable
#
public $Hook
#
public $current_row
#
API documentation generated by ApiGen