phpDocumentor epesi-utils
generic-browser
[ class tree: epesi-utils ] [ index: epesi-utils ] [ all elements ]

Class: Utils_GenericBrowser

Source Location: /modules/Utils/GenericBrowser/GenericBrowser_0.php

Class Utils_GenericBrowser

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Module

Module::$children
Module::$display_func
Module::$parent

Inherited From Module

Module::__construct()
Constructor. Should not be called directly using new Module('name').
Module::call_callback_href()
Module::clear_module_variables()
Unset all module variables.
Module::create_back_href()
Creates link that will lead back to previous page content.
Module::create_back_href_js()
Module::create_callback_href()
Creates link similar to link created with create_href.
Module::create_callback_href_js()
Creates link similar to link created with create_href.
Module::create_callback_href_with_id()
Creates link similar to links created with create_href.
Module::create_callback_href_with_id_js()
Creates link similar to links created with create_href.
Module::create_confirm_callback_href()
Creates link similar to link created with create_href.
Module::create_confirm_callback_href_with_id()
Creates link similar to links created with create_href.
Module::create_confirm_href()
Create onClick action string (with href="javascript:void(0);").
Module::create_confirm_unique_href()
Similar to create_href, but variables passed to this function will only be accessible in module that called this function.
Module::create_href()
Create onClick action string (with href="javascript:void(0);").
Module::create_href_js()
Create onClick action string destined for js code.
Module::create_unique_href()
Similar to create_href, but variables passed to this function will only be accessible in module that called this function.
Module::create_unique_href_js()
Create onClick action string destined for js code.
Module::create_unique_key()
Returns unique key name, generated from unique name of this module (function get_path) and string parameter.
Module::displayed()
Returns whether this module instance was already displayed.
Module::display_module()
Call method of the module passed as first parameter, which name is passed as second parameter.
Module::freeze_module()
Makes child module to not loose its module variables
Module::get_child()
Gets child module with specified node id.
Module::get_children()
Gets array of children modules.
Module::get_html_of_module()
Call method of the module passed as first parameter, which name is passed as second parameter.
Module::get_instance_id()
Returns id of module instance.
Module::get_jses()
Returns list of jses to evaluate.
Module::get_module_variable()
Returns value of a module variable. If the variable is not set, function will return value given as second parameter.
Module::get_module_variable_or_unique_href_variable()
Returns href variable.
Module::get_node_id()
Get node identifier.
Module::get_parent_path()
Returns unique path of parent module.
Module::get_parent_type()
Returns name(type) of parent module.
Module::get_path()
Returns unique path of calling module.
Module::get_reload()
Returns current reload settings.
Module::get_unique_href_variable()
Returns variable passed with create_unique_href.
Module::init_module()
Creates module instance which name is given as first parameter.
Module::isset_module_variable()
Checks if variable exists.
Module::isset_unique_href_variable()
Checks if variable given as first parameter was passed with create_unique_href function.
Module::is_back()
Checks if set_back_location was used.
Module::is_fast_process()
Returns whether this module instance has fast processing turned on.
Module::is_inline_display()
Returns whether this module instance is displayed inline.
Module::js()
Appends js code to list of jses to evaluate.
Module::mark_displayed()
Marks this module instance as it was displayed.
Module::pack_module()
Creates instance of module given as first parameter as a child of the module that has called this function.
Module::register_method()
Module::set_back_location()
Sets reload location to previous page display.
Module::set_fast_process()
Enable fast processing for this module instance.
Module::set_inline_display()
Changes display behavior for this module instance to inline.
Module::set_module_variable()
Sets variable that will be available only for module instance that called this function.
Module::set_reload()
Mark module to force its reload or prevent being reloaded.
Module::share_module_variable()
Share variable passed as first parameter with module passed as second parameter.
Module::share_unique_href_variable()
Share href variable passed as first parameter with module passed as second parameter.
Module::static_get_module_variable()
Returns value of a module variable. If the variable is not set, function will return value given as third parameter.
Module::static_isset_module_variable()
Checks if variable exists.
Module::static_set_module_variable()
Sets variable that will be available only for module instance that called this function.
Module::static_unset_module_variable()
Module::unset_module_variable()
Unset module variable.
Module::unset_unique_href_variable()
Unsets *unique_href variable.
Module::__call()

Inherited From ModulePrimitive

ModulePrimitive::__construct()
ModulePrimitive::check_access()
Checks access to function which name is passed as first parameter.
ModulePrimitive::create_data_dir()
Creates default data directory for module. Typical usage: in module installation
ModulePrimitive::get_data_dir()
Returns path to the default data directory for module calling this method.
ModulePrimitive::get_module_dir()
Returns path to the module directory.
ModulePrimitive::get_type()
Returns name(type) of module that called this function.
ModulePrimitive::get_type_with_bt()
ModulePrimitive::remove_data_dir()
Removes default data directory of a module. Typical usage: in module uninstallation

Inherited From ModuleAcl

ModuleAcl::acl_check()
ModuleAcl::add_aco()
ModuleAcl::del_aco()
ModuleAcl::get_type()

[ Top ]
Method Summary
void   add_row()   Adds new row with data to Generic Browser.
void   add_row_array()   Adds new row with data to Generic Browser.
void   automatic_display()   Displays the table performing paging and searching automatically.
void   body()   Displays the table.
void   change_order()   For internal use only.
void   construct()  
void   force_per_page()  
array   get_limit()   Returns values needed for proper selection of elements.
object Generic   get_new_row()   Creates new row object.
array   get_order()   Returns an array containing information about row order.
string   get_query_order()   Returns 'ORDER BY' part of an SQL query which will sort rows in order chosen by end-user.
string   get_search_query()   Returns statement that should be used in 'WHERE' caluse to select elements that were searched for.
void   is_adv_search_on()   For internal use only.
void   query_order_limit()   Executes SQL query that selects elements needed for the current page and performs sort.
void   set_custom_label()  
void   set_default_order()   Sets default order for the table.
void   set_per_page()  
void   set_postfix()  
void   set_prefix()  
void   set_table_columns()   Sets table columns according to given definition.
void   simple_table()   For internal use only.
void   sort_actions()  
void   __add_row_action()   For internal use only.
void   __add_row_data()   For internal use only.
void   __add_row_js()   For internal use only.

[ Top ]
Methods
add_row  [line 242]

  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:
Access:  public


[ Top ]
add_row_array  [line 265]

  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:
Access:  public


[ Top ]
automatic_display  [line 613]

  void automatic_display( [bool $paging = true]  )

Displays the table performing paging and searching automatically.

Parameters:
bool   $paging:  enabling paging, true by default

API Tags:
Access:  public


[ Top ]
body  [line 685]

  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:
Access:  public


[ Top ]
change_order  [line 379]

  void change_order( $ch_order  )

For internal use only.

Parameters:
   $ch_order: 

API Tags:
Access:  public


[ Top ]
construct  [line 115]

  void construct( )


API Tags:
Access:  public


[ Top ]
force_per_page  [line 673]

  void force_per_page( $i  )

Parameters:
   $i: 

API Tags:
Access:  public


[ Top ]
get_limit  [line 283]

  array get_limit( $max  )

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:
   $max: 

API Tags:
Return:  array containing two fields: 'numrows' and 'offset'
Access:  public


[ Top ]
get_new_row  [line 190]

  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


[ Top ]
get_order  [line 370]

  array get_order( )

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


[ Top ]
get_query_order  [line 332]

  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


[ Top ]
get_search_query  [line 428]

  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:
   $array: 

API Tags:
Return:  part of sql statement
Access:  public


[ Top ]
is_adv_search_on  [line 491]

  void is_adv_search_on( )

For internal use only.


API Tags:
Access:  public


[ Top ]
query_order_limit  [line 652]

  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:
Access:  public


[ Top ]
set_custom_label  [line 120]

  void set_custom_label( $arg  )

Parameters:
   $arg: 

API Tags:
Access:  public


[ Top ]
set_default_order  [line 163]

  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:
Access:  public


[ Top ]
set_per_page  [line 316]

  void set_per_page( $pp  )

Parameters:
   $pp: 

API Tags:
Access:  public


[ Top ]
set_postfix  [line 974]

  void set_postfix( $arg  )

Parameters:
   $arg: 

API Tags:
Access:  public


[ Top ]
set_prefix  [line 970]

  void set_prefix( $arg  )

Parameters:
   $arg: 

API Tags:
Access:  public


[ Top ]
set_table_columns  [line 138]

  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:
Access:  public


[ Top ]
simple_table  [line 578]

  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:
Access:  public


[ Top ]
sort_actions  [line 660]

  void sort_actions( $a, $b  )

Parameters:
   $a: 
   $b: 

API Tags:
Access:  public


[ Top ]
__add_row_action  [line 210]

  void __add_row_action( $num, $tag_attrs, $label, $tooltip, $icon  )

For internal use only.

Parameters:
   $num: 
   $tag_attrs: 
   $label: 
   $tooltip: 
   $icon: 

API Tags:
Access:  public


[ Top ]
__add_row_data  [line 198]

  void __add_row_data( $num, $arg  )

For internal use only.

Parameters:
   $num: 
   $arg: 

API Tags:
Access:  public


[ Top ]
__add_row_js  [line 219]

  void __add_row_js( $num, $js  )

For internal use only.

Parameters:
   $num: 
   $js: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 26 Dec 2008 21:42:14 -0500 by phpDocumentor 1.4.2