void add_row(
mixed
$args
)
|
|
Adds new row with data to Generic Browser.
Each argument fills one field, it can be either a string or an array.
If an array is passed it may consists following fields: value - text that will be displayed in the field style - additional css style definition hint - tooltip for the field wrapmode - what wrap method should be used (nowrap, wrap, cut)
If a string is passed it will be displayed in the field.
It's not recommended to use this function in conjunction with add_new_row().
Parameters:
|
mixed |
$args: |
list of arguments |
API Tags:
void add_row_array(
array
$arg
)
|
|
Adds new row with data to Generic Browser.
The argument should be an array, each array entry fills one field, it can be either a string or an array.
If an array is passed it may consists following fields: value - text that will be displayed in the field style - additional css style definition hint - tooltip for the field
If a string is passed it will be displayed in the field.
It's not recommended to use this function in conjunction with add_new_row().
Parameters:
|
array |
$arg: |
array with row data |
API Tags:
void automatic_display(
[bool
$paging = true]
)
|
|
Displays the table performing paging and searching automatically.
Parameters:
|
bool |
$paging: |
enabling paging, true by default |
API Tags:
void body(
[string
$template = null], [bool
$paging = true]
)
|
|
Displays the table.
Parameters:
|
string |
$template: |
template file that should be used to display the table, use Base_ThemeCommon::get_template_filename() for proper filename |
|
bool |
$paging: |
enabling paging, true by default |
API Tags:
void change_order(
$ch_order
)
|
|
For internal use only.
Parameters:
API Tags:
void force_per_page(
$i
)
|
|
Parameters:
API Tags:
Returns values needed for proper selection of elements.
This is only neccessary if you are using 'paged' version of Genric Browser. Returned values should be used together with DB::SelectLimit();
Parameters:
API Tags:
| Return: | array containing two fields: 'numrows' and 'offset' |
| Access: | public |
object Generic get_new_row(
)
|
|
Creates new row object.
You can then use methods add_data, add_data_array or add_action to manipulate and extend the row.
API Tags:
| Return: | Browser row object |
| Access: | public |
Returns an array containing information about row order.
Each field represents a column by which the order is determined. First field is used as the final order criteria, while the last field is used for the initial sort.
Each field contains: column - Generic Browser column name order - SQL column name direction - ASC or DESC
Default value returned is determined by arguments passed to set_default_order().
Do not use this method in conjuntion with get_query_order()
API Tags:
| Return: | array containing information about row order |
| Access: | public |
string get_query_order(
[string
$force_order = null]
)
|
|
Returns 'ORDER BY' part of an SQL query which will sort rows in order chosen by end-user.
Default value returned is determined by arguments passed to set_default_order(). Returned string contains space at the beginning.
Do not use this method in conjuntion with get_order()
Parameters:
|
string |
$force_order: |
columns to force order |
API Tags:
| Return: | 'ORDER BY' part of the query |
| Access: | public |
string get_search_query(
[
$array = false]
)
|
|
Returns statement that should be used in 'WHERE' caluse to select elements that were searched for.
The statement generated using search criteria is enclosed with parenthesis and does not include keyword 'WHERE'.
If no conditions where spcified returns empty string.
Parameters:
API Tags:
| Return: | part of sql statement |
| Access: | public |
For internal use only.
API Tags:
void query_order_limit(
string
$query, string
$query_numrows
)
|
|
Executes SQL query that selects elements needed for the current page and performs sort.
Parameters:
|
string |
$query: |
SQL query that selects all elements for the table |
|
string |
$query_numrows: |
SQL query that will return number of rows in the table |
API Tags:
void set_custom_label(
$arg
)
|
|
Parameters:
API Tags:
void set_default_order(
$arg, [bool
$reset = false]
)
|
|
Sets default order for the table.
This function can be called multiple times and only at the first call or if reset argument if set it will manipulate current order.
The default order should be provided as an array containing column names (names given with set_table_columns, not SQL column names).
Parameters:
|
array |
$arg: |
array with column names |
|
bool |
$reset: |
true to force order reset |
API Tags:
void set_table_columns(
array
$arg
)
|
|
Sets table columns according to given definition.
Argument should be an array, each array field represents one column. A column is defined using an array. The following fields may be used: name - column label width - width of the column (percentage of the whole table) search - sql column by which search should be performed order - sql column by which order should be deterined quickjump - sql column by which quickjump should be navigated wrapmode - what wrap method should be used (nowrap, wrap, cut)
Parameters:
|
array |
$arg: |
columns definiton |
API Tags:
void simple_table(
$header,
$data, [
$page_split = true], [
$template = null], [
$order = true]
)
|
|
For internal use only.
Parameters:
|
|
$header: |
|
|
|
$data: |
|
|
|
$page_split: |
|
|
|
$template: |
|
|
|
$order: |
|
API Tags:
void sort_actions(
$a,
$b
)
|
|
Parameters:
API Tags:
void __add_row_action(
$num,
$tag_attrs,
$label,
$tooltip,
$icon
)
|
|
For internal use only.
Parameters:
|
|
$num: |
|
|
|
$tag_attrs: |
|
|
|
$label: |
|
|
|
$tooltip: |
|
|
|
$icon: |
|
API Tags:
void __add_row_data(
$num,
$arg
)
|
|
For internal use only.
Parameters:
API Tags:
void __add_row_js(
$num,
$js
)
|
|
For internal use only.
Parameters:
API Tags: