dolibarr  19.0.0-dev
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 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 <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.

◆ delete()

ProductCombinationLevel::delete ( )

delete

Returns
int <0 KO, >0 OK

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

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

References $sql.

◆ fetch()

ProductCombinationLevel::fetch (   $rowid)

Retrieves a combination level by its rowid.

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

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

◆ fetchFormObj()

ProductCombinationLevel::fetchFormObj (   $obj)

Assign vars form an stdclass like sql obj.

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

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

References $sql.


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