dolibarr  20.0.0-alpha
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 1053 of file ProductCombination.class.php.

Constructor & Destructor Documentation

◆ __construct()

ProductCombinationLevel::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 1111 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 1297 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 1318 of file ProductCombination.class.php.

◆ delete()

ProductCombinationLevel::delete ( )

delete

Returns
int Return integer <0 KO, >0 OK

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

References $sql.

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

References $sql.

◆ 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 1122 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 1147 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 1180 of file ProductCombination.class.php.

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

References $sql.


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