ProductAttribute
in package
implements
ProductAttributeInterface
Class ProductAttribute
Tags
Interfaces, Classes and Traits
- ProductAttributeInterface
- Interface ProductAttributeInterface
Table of Contents
- $attributeModel : string
- $optionId : int
- $optionValueId : int
- $price : float
- $priceType : string
- $sortOrder : int
- $stock : float
- $weight : float
- $weightType : string
- __construct() : mixed
- Initialize the product attribute.
- getAttributeModel() : string
- Returns the attribute model of the product attribute.
- getOptionId() : int
- Returns the option id of the product attribute.
- getOptionValueId() : int
- Returns option value id of the product attribute.
- getPrice() : float
- Returns the price of the product attribute.
- getPriceType() : string
- Returns the price type of the product attribute.
- getSortOrder() : int
- Returns the sort order of the product attribute.
- getStock() : float
- Returns the stock of the product attribute.
- getWeight() : float
- Returns the weight of the product attribute.
- getWeightType() : string
- Returns the weight type of the product attribute.
- setAttributeModel() : ProductAttribute|$this
- Sets the attribute model of the product attribute.
- setOptionId() : ProductAttribute|$this
- Sets the option id of the product attribute.
- setOptionValueId() : ProductAttribute|$this
- Sets the option value id.
- setPrice() : ProductAttribute|$this
- Sets the price of the product attribute.
- setPriceType() : ProductAttribute|$this
- Sets the price type of the product attribute.
- setSortOrder() : ProductAttribute|$this
- Sets the sort order of the product attribute.
- setStock() : ProductAttribute|$this
- Sets the stock of the product attribute.
- setWeight() : ProductAttribute|$this
- Sets the weight of the product attribute.
- setWeightType() : ProductAttribute|$this
- Sets the weight type of the product attribute.
Properties
$attributeModel
protected
string
$attributeModel
= ''
$optionId
protected
int
$optionId
= 0
$optionValueId
protected
int
$optionValueId
= 0
$price
protected
float
$price
= 0.0
$priceType
protected
string
$priceType
= ''
$sortOrder
protected
int
$sortOrder
= 0
$stock
protected
float
$stock
= 0.0
$weight
protected
float
$weight
= 0.0
$weightType
protected
string
$weightType
= ''
Methods
__construct()
Initialize the product attribute.
public
__construct(IdType $optionId, IdType $valueId) : mixed
Parameters
- $optionId : IdType
-
Option id of product attribute.
- $valueId : IdType
-
Option value id of product attribute.
Return values
mixed —getAttributeModel()
Returns the attribute model of the product attribute.
public
getAttributeModel() : string
Return values
string —Model of product attribute.
getOptionId()
Returns the option id of the product attribute.
public
getOptionId() : int
Return values
int —Option id of product attribute.
getOptionValueId()
Returns option value id of the product attribute.
public
getOptionValueId() : int
Return values
int —Option value id of product attribute.
getPrice()
Returns the price of the product attribute.
public
getPrice() : float
Return values
float —Price of product attribute.
getPriceType()
Returns the price type of the product attribute.
public
getPriceType() : string
Return values
string —Price type of product attribute.
getSortOrder()
Returns the sort order of the product attribute.
public
getSortOrder() : int
Return values
int —Sort order of product attribute.
getStock()
Returns the stock of the product attribute.
public
getStock() : float
Return values
float —Stock of product attribute.
getWeight()
Returns the weight of the product attribute.
public
getWeight() : float
Return values
float —Weight of product attribute.
getWeightType()
Returns the weight type of the product attribute.
public
getWeightType() : string
Return values
string —Weight type of product attribute.
setAttributeModel()
Sets the attribute model of the product attribute.
public
setAttributeModel(StringType $attributeModel) : ProductAttribute|$this
Parameters
- $attributeModel : StringType
-
New attribute model.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setOptionId()
Sets the option id of the product attribute.
public
setOptionId(IdType $optionId) : ProductAttribute|$this
Parameters
- $optionId : IdType
-
Option id of product attribute.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setOptionValueId()
Sets the option value id.
public
setOptionValueId(IdType $optionValueId) : ProductAttribute|$this
Parameters
- $optionValueId : IdType
-
Option value id of product attribute.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setPrice()
Sets the price of the product attribute.
public
setPrice(DecimalType $price) : ProductAttribute|$this
Parameters
- $price : DecimalType
-
New price of product attribute.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setPriceType()
Sets the price type of the product attribute.
public
setPriceType(StringType $priceType) : ProductAttribute|$this
Parameters
- $priceType : StringType
-
New price type.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setSortOrder()
Sets the sort order of the product attribute.
public
setSortOrder(IntType $sortOrder) : ProductAttribute|$this
Parameters
- $sortOrder : IntType
-
New sort order position.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setStock()
Sets the stock of the product attribute.
public
setStock(DecimalType $stock) : ProductAttribute|$this
Parameters
- $stock : DecimalType
-
New stock
Return values
ProductAttribute|$this —Same instance for chained method calls.
setWeight()
Sets the weight of the product attribute.
public
setWeight(DecimalType $weight) : ProductAttribute|$this
Parameters
- $weight : DecimalType
-
New weight.
Return values
ProductAttribute|$this —Same instance for chained method calls.
setWeightType()
Sets the weight type of the product attribute.
public
setWeightType(StringType $weightType) : ProductAttribute|$this
Parameters
- $weightType : StringType
-
New weight type.
Return values
ProductAttribute|$this —Same instance for chained method calls.