tangra logo
   
[ class tree: tangra_lib ] [ index: tangra_lib ] [ all elements ]
 

Class: SP_Grid_WLC

Source Location: /grids/sp_grid_wlc.class.php

Class SP_Grid_WLC

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

Inherited From Static_Paginated_Grid

Static_Paginated_Grid::$current_page
Static_Paginated_Grid::$external_params
Static_Paginated_Grid::$page_size
Static_Paginated_Grid::$total_pages
Static_Paginated_Grid::$total_rows
Static_Paginated_Grid::$web_page

Inherited From Grid

Grid::$columns_number
Grid::$name
Grid::$rows

Inherited From Static_Paginated_Grid

Static_Paginated_Grid::__construct()
Enter description here...
Static_Paginated_Grid::add_external_parameter()
Adds external parameter
Static_Paginated_Grid::calculate_first_page()
Calculate index of first page
Static_Paginated_Grid::calculate_last_page()
Calculate index of last page
Static_Paginated_Grid::calculate_next_page()
Calculates next page index
Static_Paginated_Grid::calculate_prev_page()
Calculate previous page index
Static_Paginated_Grid::calculate_records_from()
Calculates and returns start record number
Static_Paginated_Grid::calculate_records_to()
Calculates and returnt end record number
Static_Paginated_Grid::get_current_page()
Returns current page number
Static_Paginated_Grid::get_external_params()
Returns external parameters pairs
Static_Paginated_Grid::get_page_size()
Returns page size
Static_Paginated_Grid::get_static_html()
Returns generated HTML
Static_Paginated_Grid::get_total_pages()
Retursn total pages
Static_Paginated_Grid::get_total_rows()
Returns total rows (current sql_count)
Static_Paginated_Grid::get_tple_exports()
Returns TPLE exports for the grid
Static_Paginated_Grid::get_web_events()
Returns web events that may be generated by the grid
Static_Paginated_Grid::get_web_page()
Returns web page
Static_Paginated_Grid::prepare_first_page_link()
Prepares link for the first page
Static_Paginated_Grid::prepare_jump_to_page_arr()
Prepares options array for "jump to page" select
Static_Paginated_Grid::prepare_last_page_link()
Prepare link for last page
Static_Paginated_Grid::prepare_next_page_link()
Prepare link for next page
Static_Paginated_Grid::prepare_page_link()
Prepares page link
Static_Paginated_Grid::prepare_prev_page_link()
Prepares previous page link
Static_Paginated_Grid::prepare_rows()
Convert row to usable by the class format
Static_Paginated_Grid::set_cp_and_tp()
Set current page and total pages
Static_Paginated_Grid::set_current_page()
Sets current page number
Static_Paginated_Grid::set_external_params()
Sets external parameters pairs
Static_Paginated_Grid::set_page_size()
Sets page size
Static_Paginated_Grid::set_total_pages()
Sets total pages
Static_Paginated_Grid::set_total_rows()
Sets total rows.
Static_Paginated_Grid::set_web_page()
Sets web page

Inherited From Static_Grid

Static_Grid::__construct()
Constructor
Static_Grid::get_static_html()
Returns generated HTML
Static_Grid::get_tple_exports()
Get TPLE Exports

Inherited From Grid

Grid::__construct()
Constructor
Grid::add_row()
Adds new row
Grid::get_columns_number()
Returns how many columns grid has
Grid::get_name()
Returns grid name
Grid::get_rows()
Returns reference to rows
Grid::remove_all_rows()
Removes all rows
Grid::remove_row()
Removes a row
Grid::set_columns_number()
Sets how many columns grid will have
Grid::set_name()
Sets grid name
Grid::set_rows()
Sets all rows at once

Inherited From Tangra_Class

Tangra_Class::get_class_name()
Alias of get_class(). Exist because of historical reasons.
Tangra_Class::__set()
Overides PHP built-in method and just throws exception if called. Purpose - to "forbid" autosetting of nonexisting class properties.

[ Top ]
Property Summary
array   $link_cols   Link columns
unknown_type   $link_cols_capture_values_rows   Link columns capture values

[ Top ]
Method Summary
void   add_link_col()   Adds new column
void   add_link_cols_capture_values_row()   Adds link columns capture values
string   get_static_html()   Returns HTML for the grid
TPLE_Exports   get_tple_exports()   Returns TPLE exports for the grid
array   get_web_events()   Returns array containing web events that grid may generate
string   prepare_rows()   Prepares row to be used in a convinient way by this class
void   set_link_cols_capture_values_rows()   Sets all link columns capture values at once
void   set_rows()   Sets all rows at once
void   set_rows_and_link_cols_rows_from_raw_rows()   Sets all data rows and link column capture rows using "raw rows"
array   shift_down()   Shifts down the array in order to have continiuos array index starting with 0

[ Top ]
Properties
array   $link_cols = array() [line 42]

Link columns

API Tags:
Internal:  
Access:  private


[ Top ]
unknown_type   $link_cols_capture_values_rows = array() [line 50]

Link columns capture values

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
add_link_col  [line 64]

  void add_link_col( string $name, string $target_page, string $capture  )

Adds new column

Adds new linl column to the grid with name $name, href link pointing to $target and capture $capture. Generated link will look like: <a href="$target?$capture=$link_column_capture">Something</a>

Parameters:
string   $name:  Column name
string   $target_page:  Target page
string   $capture:  Label for the capture

API Tags:
Access:  public


[ Top ]
add_link_cols_capture_values_row  [line 140]

  void add_link_cols_capture_values_row( arary $row  )

Adds link columns capture values

Link columns capture values are values that will be added at the end of the link. Example: <a href="somepage.php?obj=5"> somepage.php is $target @see SP_Grid_WLC::add_link_col() obj is the capture label 5 is the link column capture value - normally this is the id of the record but you may use different column @see SP_Grid_WLC::set_rows_and_link_cols_rows_from_raw_rows

Parameters:
arary   $row: 

API Tags:
Access:  public


[ Top ]
get_static_html  [line 114]

  string get_static_html( string $path, string $language  )

Returns HTML for the grid

Parameters:
string   $path:  Path to template file
string   $language:  Navive language code

API Tags:
Access:  public


Redefinition of:
Static_Paginated_Grid::get_static_html()
Returns generated HTML

[ Top ]
get_tple_exports  [line 98]

  TPLE_Exports get_tple_exports( )

Returns TPLE exports for the grid


API Tags:
Access:  public


Redefinition of:
Static_Paginated_Grid::get_tple_exports()
Returns TPLE exports for the grid

[ Top ]
get_web_events  [line 79]

  array get_web_events( )

Returns array containing web events that grid may generate


API Tags:
Access:  public


Redefinition of:
Static_Paginated_Grid::get_web_events()
Returns web events that may be generated by the grid

[ Top ]
prepare_rows  [line 170]

  string prepare_rows( )

Prepares row to be used in a convinient way by this class


API Tags:
Internal:  
Access:  protected

Information Tags:
Throws:  TE_Key_Not_Exists

Redefinition of:
Static_Paginated_Grid::prepare_rows()
Convert row to usable by the class format

[ Top ]
set_link_cols_capture_values_rows  [line 156]

  void set_link_cols_capture_values_rows( array $rows  )

Sets all link columns capture values at once

Parameters:
array   $rows: 

API Tags:
Access:  public


[ Top ]
set_rows  [line 232]

  void set_rows( &$rows, array $rows  )

Sets all rows at once

Shorhand for setting all rows with using column 0 and skipping used column This function is convinient when you select from database like: "Select obj.id, obj.name, obj.description where...".

Parameters:
array   $rows: 
   &$rows: 

API Tags:
See:  SP_Grid_WLC::set_rows_and_link_cols_rows_from_raw_rows
Access:  public


Redefinition of:
Grid::set_rows()
Sets all rows at once

[ Top ]
set_rows_and_link_cols_rows_from_raw_rows  [line 193]

  void set_rows_and_link_cols_rows_from_raw_rows( array $raw_rows, [integer $use_col_num = 0], [boolena $skip_used_col = false]  )

Sets all data rows and link column capture rows using "raw rows"

Parameters:
array   $raw_rows:  Array of rows as returned by the SELECT form DB
integer   $use_col_num:  Which column to be used for value of link columns capture value
boolena   $skip_used_col:  If true used column will be skipped and will not exists in final array

API Tags:
Access:  public


[ Top ]
shift_down  [line 244]

  array shift_down( array $row  )

Shifts down the array in order to have continiuos array index starting with 0

Parameters:
array   $row: 

API Tags:
Internal:  
Access:  private


[ Top ]