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

Class: Tangra_Module_DBC

Source Location: /modules_manager/tangra_module_dbc.class.php

Class Tangra_Module_DBC

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

Inherited From Tangra_Module

Tangra_Module::$description
Tangra_Module::$hid
Tangra_Module::$id
Tangra_Module::$license
Tangra_Module::$maintainer
Tangra_Module::$url

Inherited From Tangra_Module

Tangra_Module::get_description()
Gets module description
Tangra_Module::get_hid()
Gets module HID
Tangra_Module::get_id()
Gets module id
Tangra_Module::get_license()
Gets ID of the license under which module is released
Tangra_Module::get_maintainer()
Gets maintainer
Tangra_Module::get_url()
Gets URL address of web page that contain more information about module
Tangra_Module::set_description()
Sets module description
Tangra_Module::set_hid()
Sets module HID
Tangra_Module::set_id()
Sets module ID
Tangra_Module::set_license()
Sets ID of the license under which module is released
Tangra_Module::set_maintainer()
Sets module maintainer email
Tangra_Module::set_url()
Sets URL address of web page that contain more information about module

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 ]
Method Summary
static void   delete()   Deletes module
static string   get_sql_count_for_grid()   Gets count SQL for grid
static string   get_sql_for_grid()   Gets SQL for grid
static boolean   is_unique_hid()   Checks if HID is unique
static array   load_all()   Loads all modules
static array   load_all_hids_as_array()   Loads all HIDs as array
static array   load_modules_ol_map()   Loads options labels map for Form_field_select
integer   insert()   Inserts new module
integer   load_by_hid()   Loads module by HID
integer   load_by_id()   Loads by ID
integer   save()   Saves module into DB
integer   update()   Updates module DB record

[ Top ]
Methods
static method delete  [line 304]

  static void delete( DB_Connection $dbc, integer $id  )

Deletes module

Parameters:
DB_Connection   $dbc: 
integer   $id: 

API Tags:
Access:  public


[ Top ]
static method get_sql_count_for_grid  [line 182]

  static string get_sql_count_for_grid( )

Gets count SQL for grid


API Tags:
Return:  SQL statement
Access:  public


[ Top ]
static method get_sql_for_grid  [line 170]

  static string get_sql_for_grid( )

Gets SQL for grid


API Tags:
Return:  SQL statement
Access:  public


[ Top ]
static method is_unique_hid  [line 197]

  static boolean is_unique_hid( DB_Connection $dbc, string $hid, [integer $id = 0]  )

Checks if HID is unique

Parameters:
DB_Connection   $dbc: 
string   $hid:  HID to check if exists
integer   $id:  ID of current category

API Tags:
Access:  public


[ Top ]
static method load_all  [line 265]

  static array load_all( DB_Connection $dbc  )

Loads all modules

Parameters:
DB_Connection   $dbc: 

API Tags:
Return:  Array of Tangra_Module_DBC objects
Access:  public


[ Top ]
static method load_all_hids_as_array  [line 286]

  static array load_all_hids_as_array( DB_Connection $dbc  )

Loads all HIDs as array

Parameters:
DB_Connection   $dbc: 

API Tags:
Access:  public


[ Top ]
static method load_modules_ol_map  [line 215]

  static array load_modules_ol_map( DB_Connection $dbc, integer $current_module_id  )

Loads options labels map for Form_field_select

Parameters:
DB_Connection   $dbc: 
integer   $current_module_id: 

API Tags:
Access:  public


[ Top ]
insert  [line 96]

  integer insert( DB_Connection $dbc  )

Inserts new module

Parameters:
DB_Connection   $dbc: 

API Tags:
Return:  On success returns module ID, on failure - false
Internal:  
Access:  protected


[ Top ]
load_by_hid  [line 243]

  integer load_by_hid( DB_Connection $dbc, string $hid  )

Loads module by HID

Parameters:
DB_Connection   $dbc: 
string   $hid: 

API Tags:
Return:  On success returns module ID, on failure - false
Access:  public


[ Top ]
load_by_id  [line 59]

  integer load_by_id( DB_Connection $dbc, integer $id  )

Loads by ID

Parameters:
DB_Connection   $dbc: 
integer   $id: 

API Tags:
Return:  On success returns module ID, on failure - false
Access:  public


Implementation of:
I_DB_Storable::load_by_id()
Loads the object from DB

[ Top ]
save  [line 37]

  integer save( DB_Connection $dbc  )

Saves module into DB

Parameters:
DB_Connection   $dbc: 

API Tags:
Return:  On success returns module ID, on failure - false
Access:  public


Implementation of:
I_DB_Storable::save()
Save the object in DB

[ Top ]
update  [line 140]

  integer update( DB_Connection $dbc  )

Updates module DB record

Parameters:
DB_Connection   $dbc: 

API Tags:
Return:  On success returns module ID, on failure - false
Internal:  
Access:  protected


[ Top ]