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

Class: Grid

Source Location: /grids/grid.class.php

Class Grid

Class Overview

Grids are used to present data in table format Grid is base class for all grids.

Located in /grids/grid.class.php [line 39]

Tangra_Class
   |
   --Grid
Author(s):
API Tags:
Abstract:  

Properties

Methods

[ Top ]
Descendants
Child Class Description
Static_Grid Static Grid
Paginated_Grid Grid with pagination

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

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   $columns_number   How many coluns will grid have
string   $name   Name of the grid
array   $rows   Data rows

[ Top ]
Method Summary
Grid   __construct()   Constructor
void   add_row()   Adds new row
integer   get_columns_number()   Returns how many columns grid has
string   get_name()   Returns grid name
unknown   &get_rows()   Returns reference to rows
void   remove_all_rows()   Removes all rows
void   remove_row()   Removes a row
void   set_columns_number()   Sets how many columns grid will have
void   set_name()   Sets grid name
void   set_rows()   Sets all rows at once

[ Top ]
Properties
integer   $columns_number = 0 [line 61]

How many coluns will grid have

API Tags:
Access:  private


[ Top ]
string   $name [line 54]

Name of the grid

API Tags:
Internal:  
Access:  private


[ Top ]
array   $rows = array() [line 46]

Data rows

API Tags:
Internal:  
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 70]

  Grid __construct( string $name, integer $columns_number  )

Constructor

Parameters:
string   $name:  Name of the grid
integer   $columns_number:  How many coluns will grid have


Redefined in descendants as:

[ Top ]
add_row  [line 128]

  void add_row( array $row  )

Adds new row

Parameters:
array   $row: 

API Tags:
Access:  public

Information Tags:
Throws:  TE_Grid_Column_Count_Not_Matched, TE_Not_An_Array

[ Top ]
get_columns_number  [line 117]

  integer get_columns_number( )

Returns how many columns grid has


API Tags:
Access:  public


[ Top ]
get_name  [line 96]

  string get_name( )

Returns grid name


API Tags:
Access:  public


[ Top ]
get_rows  [line 192]

  unknown &get_rows( )

Returns reference to rows


API Tags:
Access:  public


[ Top ]
remove_all_rows  [line 182]

  void remove_all_rows( )

Removes all rows


API Tags:
Access:  public


[ Top ]
remove_row  [line 146]

  void remove_row( integer $row_num  )

Removes a row

Parameters:
integer   $row_num:  Row index

API Tags:
Access:  public


[ Top ]
set_columns_number  [line 106]

  void set_columns_number( integer $number  )

Sets how many columns grid will have

Parameters:
integer   $number: 

API Tags:
Access:  public


[ Top ]
set_name  [line 82]

  void set_name( string $name  )

Sets grid name

Parameters:
string   $name: 

API Tags:
Access:  public

Information Tags:
Throws:  Tangra_Exception

[ Top ]
set_rows  [line 163]

  void set_rows( &$rows, array $rows  )

Sets all rows at once

Parameters:
array   $rows: 
   &$rows: 

API Tags:
Access:  public

Information Tags:
Throws:  TE_Not_An_Array

Redefined in descendants as:

[ Top ]