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

Class: Static_Paginated_Grid

Source Location: /grids/static_paginated_grid.class.php

Class Static_Paginated_Grid

Descendants
Child Class Description
SP_Grid_WLC Static Grid with link columns and paginator

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Grid

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

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
integer   $current_page   Current page
array   $external_params   Array that contains external parameters pairs
integer   $page_size   Size of the page
integer   $total_pages   Total pages
unknown_type   $total_rows   Holds total number of rows
string   $web_page   Web page that contains the controller

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

[ Top ]
Properties
integer   $current_page = 0 [line 43]

Current page

API Tags:
Internal:  
Access:  private


[ Top ]
array   $external_params = array() [line 67]

Array that contains external parameters pairs

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $page_size [line 75]

Size of the page

API Tags:
Internal:  
Access:  private


[ Top ]
integer   $total_pages = 0 [line 51]

Total pages

API Tags:
Internal:  
Access:  private


[ Top ]
unknown_type   $total_rows [line 83]

Holds total number of rows

API Tags:
Access:  private


[ Top ]
string   $web_page [line 59]

Web page that contains the controller

API Tags:
Internal:  
Access:  private


[ Top ]
Methods
Constructor __construct  [line 95]

  Static_Paginated_Grid __construct( string $name, string $web_page, integer $columns_number, [ $page_size = 10], integer $current_page, integer $total_pages  )

Enter description here...

Parameters:
string   $name:  Name of the grid
string   $web_page:  Page that will controll the grid
integer   $columns_number:  How many coluns will grid have
integer   $current_page:  Current page
integer   $total_pages:  Total pages
   $page_size: 


Redefinition of:
Static_Grid::__construct()
Constructor

[ Top ]
add_external_parameter  [line 161]

  void add_external_parameter( string $name, mixed $value  )

Adds external parameter

Parameters:
string   $name: 
mixed   $value: 

API Tags:
Access:  public

Information Tags:
Throws:  TE_Key_Already_Exists

[ Top ]
calculate_first_page  [line 339]

  integer calculate_first_page( )

Calculate index of first page


API Tags:
Internal:  
Access:  protected


[ Top ]
calculate_last_page  [line 374]

  integer calculate_last_page( )

Calculate index of last page


API Tags:
Internal:  
Access:  protected


[ Top ]
calculate_next_page  [line 410]

  integer calculate_next_page( )

Calculates next page index


API Tags:
Internal:  
Access:  protected


[ Top ]
calculate_prev_page  [line 451]

  integer calculate_prev_page( )

Calculate previous page index


API Tags:
Internal:  
Access:  protected


[ Top ]
calculate_records_from  [line 506]

  void calculate_records_from( )

Calculates and returns start record number


API Tags:
Access:  protected


[ Top ]
calculate_records_to  [line 517]

  void calculate_records_to( )

Calculates and returnt end record number


API Tags:
Access:  protected


[ Top ]
get_current_page  [line 129]

  integer get_current_page( )

Returns current page number


API Tags:
Access:  public


[ Top ]
get_external_params  [line 192]

  array get_external_params( )

Returns external parameters pairs


API Tags:
Access:  public


[ Top ]
get_page_size  [line 317]

  integer get_page_size( )

Returns page size


API Tags:
Access:  public


[ Top ]
get_static_html  [line 269]

  string get_static_html( string $path, unknown_type $language  )

Returns generated HTML

Parameters:
string   $path:  Path to template file
unknown_type   $language:  Navite language code

API Tags:
Access:  public


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

Redefined in descendants as:

[ Top ]
get_total_pages  [line 149]

  integer get_total_pages( )

Retursn total pages


API Tags:
Access:  public


[ Top ]
get_total_rows  [line 306]

  integer get_total_rows( )

Returns total rows (current sql_count)


API Tags:
Access:  public


[ Top ]
get_tple_exports  [line 216]

  TPLE_Exports get_tple_exports( )

Returns TPLE exports for the grid


API Tags:
Access:  public


Redefinition of:
Static_Grid::get_tple_exports()
Get TPLE Exports

Redefined in descendants as:

[ Top ]
get_web_events  [line 257]

  array get_web_events( )

Returns web events that may be generated by the grid


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
get_web_page  [line 108]

  unknown get_web_page( )

Returns web page


API Tags:
Access:  public


[ Top ]
prepare_first_page_link  [line 356]

  string prepare_first_page_link( )

Prepares link for the first page


API Tags:
Internal:  
Access:  protected


[ Top ]
prepare_jump_to_page_arr  [line 529]

  array prepare_jump_to_page_arr( )

Prepares options array for "jump to page" select


API Tags:
Access:  protected


[ Top ]
prepare_last_page_link  [line 391]

  string prepare_last_page_link( )

Prepare link for last page


API Tags:
Internal:  
Access:  protected


[ Top ]
prepare_next_page_link  [line 432]

  string prepare_next_page_link( )

Prepare link for next page


API Tags:
Internal:  
Access:  protected


[ Top ]
prepare_page_link  [line 546]

  string prepare_page_link( )

Prepares page link


API Tags:
Internal:  
Access:  private


[ Top ]
prepare_prev_page_link  [line 474]

  string prepare_prev_page_link( )

Prepares previous page link


API Tags:
Internal:  
Access:  protected


[ Top ]
prepare_rows  [line 492]

  array prepare_rows( )

Convert row to usable by the class format


API Tags:
Internal:  
Access:  protected


Redefined in descendants as:

[ Top ]
set_cp_and_tp  [line 205]

  void set_cp_and_tp( integer $current_page, integer $total_pages  )

Set current page and total pages

Just a handy function that combines two other funcs

Parameters:
integer   $current_page: 
integer   $total_pages: 

API Tags:
Access:  public


[ Top ]
set_current_page  [line 118]

  void set_current_page( integer $current_page  )

Sets current page number

Parameters:
integer   $current_page: 

API Tags:
Access:  public


[ Top ]
set_external_params  [line 176]

  void set_external_params( array $external_params  )

Sets external parameters pairs

$external_params have to contain key => value pairs where $key wil become name of the parameter.

Parameters:
array   $external_params: 

API Tags:
Access:  public


[ Top ]
set_page_size  [line 286]

  void set_page_size( integer $page_size  )

Sets page size

Parameters:
integer   $page_size: 

API Tags:
Access:  public


[ Top ]
set_total_pages  [line 139]

  void set_total_pages( integer $total_pages  )

Sets total pages

Parameters:
integer   $total_pages: 

API Tags:
Access:  public


[ Top ]
set_total_rows  [line 296]

  void set_total_rows( unknown_type $total_rows  )

Sets total rows.

Parameters:
unknown_type   $total_rows: 

API Tags:
Access:  public


[ Top ]
set_web_page  [line 328]