Class TAttribut

Description

Manage the attribut informations for a product (t-shirt Size : L, XL, S) Size is an attribut

  • author: SimpliciWeb
  • version: $Id: t_attribut.class.php 851 2008-01-18 10:58:35Z stephanet $

Located in /core/internal_components/admin_sites/t_attribut/t_attribut.class.php (line 59)


	
			
Variable Summary
Method Summary
 bool delete (integer $p_att_id)
 bool deleteByPmaId (integer $p_pma_id)
 bool get (integer $p_pma_id,  &$r_attribut_names_array, array $r_attribut_names_array)
 bool getDistincts ( &$r_attribut_names_array, array $r_attribut_names_array)
 bool getId (integer $p_pma_id, string $p_att_name,  &$r_att_id, integer $r_att_id)
 bool getNameAndValueCombinaisons (integer $p_pma_id,  &$r_combinaisons,  &$r_states,  &$r_keys_combi, [array $just_for_optimisation_getWithTProductSlaveAndTAttribut = array()], array $r_combinaisons, array $r_states, array $r_keys_combi)
 bool insertAttribut ( &$r_result, integer $p_att_pma_id, string $p_att_name, ineger $r_result)
 bool insertNameAndValue (integer $p_att_pma_id, integer $p_ava_psl_id, string $p_att_name, string $p_ava_value)
 bool isNotValidId (string $p_value)
 bool isNotValidName (string $p_value)
 bool update (integer $p_pma_id, integer $p_att_id, string $p_att_name)
 bool xIsUniqueAttName (integer $p_att_pma_id, string $p_att_name,  &$r_isUniqueName, [integer $p_att_id = 0], bool $r_isUniqueName)
Variables
DbConnexion $m_db_connexion = NULL (line 115)

Database Connexion object

Format $m_object_format = NULL (line 133)

Format Object

TAttribuValue $m_object_tattributvalue = NULL (line 127)

TAttribuValue Object

TProductMaster $m_object_tproductmaster = NULL (line 139)

TProductMaster Object

TProductSlave $m_object_tproductslave = NULL (line 145)

TProductSlave Object

siteInformation $m_site_information = NULL (line 121)

SiteInformation Object

string $req_delete_att_name_by_attid = "" (line 84)

SQL Request : Delete an attribut by his attribut id

string $req_delete_att_name_by_pmaid = "" (line 78)

SQL Request : Delete an attribut by a product master id

string $req_insert_att_name = "" (line 72)

SQL Request : insert an attribut name

string $req_select_att_choice = "" (line 108)

SQL Request :

string $req_select_att_id = "" (line 102)

SQL Request : Select by product master and attribut name

string $req_select_att_names_from_pmaid = "" (line 90)

SQL Request : Select attrbut names from a product master id

string $req_select_count_att_name = "" (line 96)

SQL Request : Select the number of attribut name

string $req_update_att_name = "" (line 66)

SQL Request : Update an attribut name

Methods
Constructor TAttribut (line 153)

Constructor, init the requests and objects

TAttribut TAttribut ()
delete (line 317)

Delete by attribut id

  • return: TRUE on error
bool delete (integer $p_att_id)
  • integer $p_att_id
deleteByPmaId (line 342)

Delete by product master id

  • return: TRUE on error
bool deleteByPmaId (integer $p_pma_id)
  • integer $p_pma_id
get (line 282)

Get attribut by product master id

  • return: TRUE on error
bool get (integer $p_pma_id,  &$r_attribut_names_array, array $r_attribut_names_array)
  • integer $p_pma_id
  • array $r_attribut_names_array
  • &$r_attribut_names_array
getDistincts (line 255)

List all and distinctly attribut names

  • return: TRUE on error
bool getDistincts ( &$r_attribut_names_array, array $r_attribut_names_array)
  • array $r_attribut_names_array
  • &$r_attribut_names_array
getId (line 218)

Get attribut id from a producmaster Id and attribut name

  • return: TRUE on error
bool getId (integer $p_pma_id, string $p_att_name,  &$r_att_id, integer $r_att_id)
  • integer $p_pma_id
  • string $p_att_name
  • integer $r_att_id
  • &$r_att_id
getNameAndValueCombinaisons (line 577)

Return all the combinaisons of the attributs for a product.

Usefull for detecting empty couples.

  • return: TRUE on error
bool getNameAndValueCombinaisons (integer $p_pma_id,  &$r_combinaisons,  &$r_states,  &$r_keys_combi, [array $just_for_optimisation_getWithTProductSlaveAndTAttribut = array()], array $r_combinaisons, array $r_states, array $r_keys_combi)
  • integer $p_pma_id
  • array $r_combinaisons
  • array $r_states
  • array $r_keys_combi
  • array $just_for_optimisation_getWithTProductSlaveAndTAttribut
  • &$r_combinaisons
  • &$r_states
  • &$r_keys_combi
insertAttribut (line 529)

Add a new attribut for a product master

  • return: TRUE on error
bool insertAttribut ( &$r_result, integer $p_att_pma_id, string $p_att_name, ineger $r_result)
  • ineger $r_result: The attribut Id
  • integer $p_att_pma_id
  • string $p_att_name
  • &$r_result
insertNameAndValue (line 475)

Insert a couple attribut name and value for a product slave (need also product master id)

  • return: TRUE on error
bool insertNameAndValue (integer $p_att_pma_id, integer $p_ava_psl_id, string $p_att_name, string $p_ava_value)
  • integer $p_att_pma_id
  • integer $p_ava_psl_id
  • string $p_att_name
  • string $p_ava_value
isNotValidId (line 194)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidId (string $p_value)
  • string $p_value
isNotValidName (line 205)

Parameter Integrity checker

  • return: TRUE if not valid
  • access: private
bool isNotValidName (string $p_value)
  • string $p_value
update (line 435)

Update an attribut name for a product master

  • return: TRUE on error
bool update (integer $p_pma_id, integer $p_att_id, string $p_att_name)
  • integer $p_pma_id
  • integer $p_att_id
  • string $p_att_name
xIsUniqueAttName (line 384)

Check if is unique attribut name

  • return: TRUE on error
  • access: private
bool xIsUniqueAttName (integer $p_att_pma_id, string $p_att_name,  &$r_isUniqueName, [integer $p_att_id = 0], bool $r_isUniqueName)
  • integer $p_att_pma_id
  • string $p_att_name
  • bool $r_isUniqueName
  • integer $p_att_id
  • &$r_isUniqueName

Documentation generated on Tue, 25 Mar 2008 15:36:03 +0100 by phpDocumentor 1.3.2