dolibarr  13.0.2
Public Member Functions | Static Public Member Functions | List of all members
ProductCombinationLevel Class Reference

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

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Class ProductCombinationLevel Used to represent a product combination Level.

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

Constructor & Destructor Documentation

ProductCombinationLevel::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

References db.

Member Function Documentation

ProductCombinationLevel::clean (   $fk_product_attribute_combination)

Clean not needed price levels for a combination.

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

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

References db.

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 1230 of file ProductCombination.class.php.

Referenced by ProductCombination\fetchCombinationPriceLevels().

ProductCombinationLevel::delete ( )

delete

Returns
int <0 KO, >0 OK

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

References db.

ProductCombinationLevel::deleteAllForCombination (   $fk_product_attribute_combination)

delete all for a combination

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

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

References db.

ProductCombinationLevel::fetch (   $rowid)

Retrieves a combination level by its rowid.

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

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

References db, and fetchFormObj().

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 1058 of file ProductCombination.class.php.

References db.

ProductCombinationLevel::fetchFormObj (   $obj)

assign vars form an stdclass like sql obj

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

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

Referenced by fetch().

ProductCombinationLevel::save ( )

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

Returns
int <0 KO, >0 OK

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

References db.


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