|
Andrew's Web Libraries (AWL) 0.64
|
Public Member Functions | |
| __construct ( $title="") | |
| AddColumn ( $field, $header="", $align="", $format="", $sql="", $class="", $datatype="", $hook=null) | |
| AddHidden ( $field, $sql="") | |
| SetTitle ( $new_title) | |
| Title ( $new_title=null) | |
| SetTranslatable ( $column_list) | |
| SetSubTitle ( $sub_title) | |
| SetDiv ( $open_div, $close_div) | |
| SetJoins ( $join_list) | |
| SetUnion ( $union_select) | |
| SetWhere ( $where_clause) | |
| SetDistinct ( $distinct) | |
| SetLimit ( $limit_n) | |
| SetOffset ( $offset_n) | |
| MoreWhere ( $operator, $more_where) | |
| AndWhere ( $more_where) | |
| OrWhere ( $more_where) | |
| AddGrouping ( $field, $browser_array_key=0) | |
| AddOrder ( $field, $direction, $browser_array_key=0, $secondary=0) | |
Definition at line 178 of file classBrowser.php.
| Browser::__construct | ( | $title = "" | ) |
The Browser class constructor
| string | $title | A title for the browser (optional). |
Definition at line 218 of file classBrowser.php.
| Browser::AddColumn | ( | $field, | |
| $header = "", | |||
| $align = "", | |||
| $format = "", | |||
| $sql = "", | |||
| $class = "", | |||
| $datatype = "", | |||
| $hook = null ) |
Add a column to the Browser.
This constructs a new BrowserColumn, appending it to the array of columns in this Browser.
Note that if the $format parameter starts with '
' the format will replace the column format, otherwise it will be used within '
...
' tags.
| string | $field | The name of the field. |
| string | $header | A column header for the field. |
| string | $align | An alignment for column values. |
| string | $format | A sprintf format for displaying column values. |
| string | $sql | An SQL fragment for calculating the value. |
| string | $class | A CSS class to apply to the cells of this column. |
| 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 264 of file classBrowser.php.
| Browser::AddGrouping | ( | $field, | |
| $browser_array_key = 0 ) |
Definition at line 453 of file classBrowser.php.
| Browser::AddHidden | ( | $field, | |
| $sql = "" ) |
Add a hidden column - one that is present in the SQL result, but for which there is no column displayed.
This can be useful for including a value in (e.g.) clickable links or title attributes which is not actually displayed as a visible column.
| string | $field | The name of the field. |
| string | $sql | An SQL fragment to calculate the field, if it is calculated. |
Definition at line 279 of file classBrowser.php.
| Browser::AddOrder | ( | $field, | |
| $direction, | |||
| $browser_array_key = 0, | |||
| $secondary = 0 ) |
Add an ordering to the browser widget.
The ordering can be overridden by GET parameters which will be rendered into the column headers so that a user can click on the column headers to control the actual order.
| string | $field | The name of the field to be ordered by. |
| string | $direction | A for Ascending, otherwise it will be descending order. |
| string | $browser_array_key | Use this to distinguish between multiple browser widgets on the same page. Leave it empty if you only have a single browser instance. |
| string | $secondary | Use this to indicate a default secondary order which shouldn't interfere with the default primary order. |
Definition at line 478 of file classBrowser.php.
| Browser::AndWhere | ( | $more_where | ) |
Add an OR ... to the SQL Where clause
| string | $more_where | The extra part of the where clause |
Definition at line 440 of file classBrowser.php.
| Browser::MoreWhere | ( | $operator, | |
| $more_where ) |
Add an [operator] ... to the SQL Where clause
You will generally want to call OrWhere or AndWhere rather than this function, but hey: who am I to tell you how to code!
| string | $operator | The operator to combine with previous where clause parts. |
| string | $more_where | The extra part of the where clause |
Definition at line 427 of file classBrowser.php.
| Browser::OrWhere | ( | $more_where | ) |
Add an OR ... to the SQL Where clause
| string | $more_where | The extra part of the where clause |
Definition at line 449 of file classBrowser.php.
| Browser::SetDistinct | ( | $distinct | ) |
Set the SQL DISTINCT clause to a specific value.
The whole clause (except the keyword) needs to be supplied
| string | $distinct | The whole clause, after 'DISTINCT' |
Definition at line 392 of file classBrowser.php.
| Browser::SetDiv | ( | $open_div, | |
| $close_div ) |
Set a div for wrapping the browse.
| string | $open_div | The HTML to open the div |
| string | $close_div | The HTML to open the div |
Definition at line 343 of file classBrowser.php.
| Browser::SetJoins | ( | $join_list | ) |
Set the tables and joins for the SQL.
For a single table this should just contain the name of that table, but for multiple tables it should be the full content of the SQL 'FROM ...' clause (excluding the actual 'FROM' keyword).
| string | $join_list |
Definition at line 357 of file classBrowser.php.
| Browser::SetLimit | ( | $limit_n | ) |
Set the SQL LIMIT clause to a specific value.
Only the limit number should be supplied.
| int | $limit_n | A number of rows to limit the SQL selection to |
Definition at line 403 of file classBrowser.php.
| Browser::SetOffset | ( | $offset_n | ) |
Set the SQL OFFSET clause to a specific value.
Only the offset number
| int | $offset_n | A number of rows to offset the SQL selection to, based from the start of the results. |
Definition at line 414 of file classBrowser.php.
| Browser::SetSubTitle | ( | $sub_title | ) |
Set a Sub Title for the browse.
| string | $sub_title | The sub title string |
Definition at line 333 of file classBrowser.php.
| Browser::SetTitle | ( | $new_title | ) |
Set the Title for the browse.
This can also be set in the constructor but if you create a template Browser and then clone it in a loop you may want to assign a different Title for each instance.
| string | $new_title | The new title for the browser |
Definition at line 293 of file classBrowser.php.
| Browser::SetTranslatable | ( | $column_list | ) |
Set the named columns to be translatable
| array | $column_list | The list of columns which are translatable |
Definition at line 315 of file classBrowser.php.
| Browser::SetUnion | ( | $union_select | ) |
Set a Union SQL statement.
In rare cases this might be useful. It's currently a fairly simple hack which requires you to put an entire valid (& matching) UNION subclause (although without the UNION keyword).
| string | $union_select |
Definition at line 370 of file classBrowser.php.
| Browser::SetWhere | ( | $where_clause | ) |
Set the SQL Where clause to a specific value.
The WHERE keyword should not be included.
| string | $where_clause | A valide SQL WHERE ... clause. |
Definition at line 381 of file classBrowser.php.
| Browser::Title | ( | $new_title = null | ) |
Accessor for the Title for the browse, which could set the title also.
| string | $new_title | The new title for the browser |
Definition at line 304 of file classBrowser.php.
| Browser::$BeginExtraRow |
Definition at line 201 of file classBrowser.php.
| Browser::$BeginExtraRowArgs |
Definition at line 203 of file classBrowser.php.
| Browser::$BeginRow |
Definition at line 198 of file classBrowser.php.
| Browser::$BeginRowArgs |
Definition at line 200 of file classBrowser.php.
| Browser::$CloseExtraRow |
Definition at line 202 of file classBrowser.php.
| Browser::$CloseRow |
Definition at line 199 of file classBrowser.php.
| Browser::$Columns |
Definition at line 183 of file classBrowser.php.
| Browser::$Distinct |
Definition at line 187 of file classBrowser.php.
| Browser::$DivClose |
Definition at line 211 of file classBrowser.php.
| Browser::$DivOpen |
Definition at line 210 of file classBrowser.php.
| Browser::$ExtraRows |
Definition at line 206 of file classBrowser.php.
| Browser::$FieldNames |
Definition at line 182 of file classBrowser.php.
| Browser::$ForcedOrder |
Definition at line 193 of file classBrowser.php.
| Browser::$Grouping |
Definition at line 194 of file classBrowser.php.
| Browser::$HiddenColumns |
Definition at line 184 of file classBrowser.php.
| Browser::$Joins |
Definition at line 185 of file classBrowser.php.
| Browser::$Limit |
Definition at line 195 of file classBrowser.php.
| Browser::$match_column |
Definition at line 207 of file classBrowser.php.
| Browser::$match_function |
Definition at line 209 of file classBrowser.php.
| Browser::$match_value |
Definition at line 208 of file classBrowser.php.
| Browser::$Offset |
Definition at line 196 of file classBrowser.php.
| Browser::$Order |
Definition at line 189 of file classBrowser.php.
| Browser::$OrderBrowserKey |
Definition at line 192 of file classBrowser.php.
| Browser::$OrderDirection |
Definition at line 191 of file classBrowser.php.
| Browser::$OrderField |
Definition at line 190 of file classBrowser.php.
| Browser::$Query |
Definition at line 197 of file classBrowser.php.
| Browser::$SubTitle |
Definition at line 181 of file classBrowser.php.
| Browser::$Title |
Definition at line 180 of file classBrowser.php.
| Browser::$TotalFuncs |
Definition at line 205 of file classBrowser.php.
| Browser::$Totals |
Definition at line 204 of file classBrowser.php.
| Browser::$Union |
Definition at line 188 of file classBrowser.php.
| Browser::$Where |
Definition at line 186 of file classBrowser.php.