dolibarr  17.0.4
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 1003 of file ProductCombination.class.php.

Constructor & Destructor Documentation

◆ __construct()

ProductCombinationLevel::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

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

References db.

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 <0 KO, >0 OK

Definition at line 1237 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 1258 of file ProductCombination.class.php.

◆ delete()

ProductCombinationLevel::delete ( )

delete

Returns
int <0 KO, >0 OK

Definition at line 1207 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 <0 KO, >0 OK

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

◆ fetch()

ProductCombinationLevel::fetch (   $rowid)

Retrieves a combination level by its rowid.

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

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

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

◆ fetchFormObj()

ProductCombinationLevel::fetchFormObj (   $obj)

Assign vars form an stdclass like sql obj.

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

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

◆ save()

ProductCombinationLevel::save ( )

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

Returns
int <0 KO, >0 OK

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


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