dolibarr 19.0.3
ProductCombinationLevel Class Reference

Class ProductCombinationLevel Used to represent a product combination Level. More...

Public Member Functions

 __construct (DoliDB $db)
 Constructor.
 
 fetch ($rowid)
 Retrieves a combination level by its rowid.
 
 fetchAll ($fk_product_attribute_combination, $fk_price_level=0)
 Retrieves combination price levels.
 
 fetchFormObj ($obj)
 Assign vars form an stdclass like sql obj.
 
 save ()
 Save a price impact of a product combination for a price level.
 
 delete ()
 delete
 
 deleteAllForCombination ($fk_product_attribute_combination)
 delete all for a combination
 
 clean ($fk_product_attribute_combination)
 Clean not needed price levels for a combination.
 

Static Public Member Functions

static createFromParent (DoliDB $db, ProductCombination $productCombination, $fkPriceLevel)
 Create new Product Combination Price level from Parent.
 

Detailed Description

Class ProductCombinationLevel Used to represent a product combination Level.

Definition at line 1013 of file ProductCombination.class.php.

Constructor & Destructor Documentation

◆ __construct()

ProductCombinationLevel::__construct ( DoliDB $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 1071 of file ProductCombination.class.php.

Member Function Documentation

◆ clean()

ProductCombinationLevel::clean ( $fk_product_attribute_combination)

Clean not needed price levels for a combination.

Parameters
int$fk_product_attribute_combinationId of combination
Returns
int Return integer <0 KO, >0 OK

Definition at line 1257 of file ProductCombination.class.php.

◆ createFromParent()

static ProductCombinationLevel::createFromParent ( DoliDB $db,
ProductCombination $productCombination,
$fkPriceLevel )
static

Create new Product Combination Price level from Parent.

Parameters
DoliDB$dbDatabase handler
ProductCombination$productCombinationProduct combination
int$fkPriceLevelPrice level
Returns
ProductCombinationLevel

Definition at line 1278 of file ProductCombination.class.php.

Referenced by ProductCombination\fetchCombinationPriceLevels().

◆ delete()

ProductCombinationLevel::delete ( )

delete

Returns
int Return integer <0 KO, >0 OK

Definition at line 1227 of file ProductCombination.class.php.

◆ deleteAllForCombination()

ProductCombinationLevel::deleteAllForCombination ( $fk_product_attribute_combination)

delete all for a combination

Parameters
int$fk_product_attribute_combinationId of combination
Returns
int Return integer <0 KO, >0 OK

Definition at line 1242 of file ProductCombination.class.php.

◆ fetch()

ProductCombinationLevel::fetch ( $rowid)

Retrieves a combination level by its rowid.

Parameters
int$rowidRow id
Returns
int Return integer <0 KO, >0 OK

Definition at line 1082 of file ProductCombination.class.php.

References fetchFormObj().

◆ fetchAll()

ProductCombinationLevel::fetchAll ( $fk_product_attribute_combination,
$fk_price_level = 0 )

Retrieves combination price levels.

Parameters
int$fk_product_attribute_combinationId of product combination
int$fk_price_levelThe price level to fetch, use 0 for all
Returns
mixed self[] | -1 on KO

Definition at line 1107 of file ProductCombination.class.php.

◆ fetchFormObj()

ProductCombinationLevel::fetchFormObj ( $obj)

Assign vars form an stdclass like sql obj.

Parameters
Object$objObject resultset
Returns
int Return integer <0 KO, >0 OK

Definition at line 1140 of file ProductCombination.class.php.

Referenced by fetch().

◆ save()

ProductCombinationLevel::save ( )

Save a price impact of a product combination for a price level.

Returns
int Return integer <0 KO, >0 OK

Definition at line 1161 of file ProductCombination.class.php.


The documentation for this class was generated from the following file: