dolibarr  9.0.0
Public Member Functions | List of all members
ProductAttributeValue Class Reference

Class ProductAttributeValue Used to represent a product attribute value. More...

Public Member Functions

 __construct (DoliDB $db)
 Constructor. More...
 
 fetch ($valueid)
 Gets a product attribute value. More...
 
 fetchAllByProductAttribute ($prodattr_id, $only_used=false)
 Returns all product attribute values of a product attribute. More...
 
 create (User $user)
 Creates a value for a product attribute. More...
 
 update (User $user)
 Updates a product attribute value. More...
 
 delete ()
 Deletes a product attribute value. More...
 
 deleteByFkAttribute ($fk_attribute)
 Deletes all product attribute values by a product attribute id. More...
 

Detailed Description

Class ProductAttributeValue Used to represent a product attribute value.

Definition at line 23 of file ProductAttributeValue.class.php.

Constructor & Destructor Documentation

◆ __construct()

ProductAttributeValue::__construct ( DoliDB  $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 60 of file ProductAttributeValue.class.php.

Member Function Documentation

◆ create()

ProductAttributeValue::create ( User  $user)

Creates a value for a product attribute.

Parameters
User$userObject user
Returns
int <0 KO >0 OK

Definition at line 151 of file ProductAttributeValue.class.php.

◆ delete()

ProductAttributeValue::delete ( )

Deletes a product attribute value.

Returns
int <0 KO, >0 OK

Definition at line 202 of file ProductAttributeValue.class.php.

◆ deleteByFkAttribute()

ProductAttributeValue::deleteByFkAttribute (   $fk_attribute)

Deletes all product attribute values by a product attribute id.

Parameters
int$fk_attributeProduct attribute id
Returns
int <0 KO, >0 OK

Definition at line 219 of file ProductAttributeValue.class.php.

◆ fetch()

ProductAttributeValue::fetch (   $valueid)

Gets a product attribute value.

Parameters
int$valueidProduct attribute value id
Returns
int <0 KO, >0 OK

Definition at line 74 of file ProductAttributeValue.class.php.

◆ fetchAllByProductAttribute()

ProductAttributeValue::fetchAllByProductAttribute (   $prodattr_id,
  $only_used = false 
)

Returns all product attribute values of a product attribute.

Parameters
int$prodattr_idProduct attribute id
bool$only_usedFetch only used attribute values
Returns
ProductAttributeValue[]

Definition at line 105 of file ProductAttributeValue.class.php.

◆ update()

ProductAttributeValue::update ( User  $user)

Updates a product attribute value.

Parameters
User$userObject user
Returns
int <0 if KO, >0 if OK

Definition at line 180 of file ProductAttributeValue.class.php.


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