Property | Type | Description | |
---|---|---|---|
$attributes | Doctrine\Common\Collections\Collection | Attributes associated with this product | |
$principalVariant | Elcodi\Component\Product\Entity\Interfaces\VariantInterface | Principal variant for this product | |
$type | integer | Product type | |
$variants | Doctrine\Common\Collections\Collection | Variants for this product |
Method | Description | |
---|---|---|
addAttribute ( Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface $attribute ) | Adds an attribute if not already in the collection. | |
addCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $category ) | Add category. | |
addVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant ) | Adds a Variant for this Product. | |
getAttributes ( ) : Doctrine\Common\Collections\Collection | Returns product attributes. | |
getPrincipalVariant ( ) : Elcodi\Component\Product\Entity\Interfaces\VariantInterface | Returns product principal variant. | |
getPurchasableType ( ) : string | Get purchasable type. | |
getType ( ) : integer | Get Type. | |
getVariants ( ) : Doctrine\Common\Collections\Collection | Gets product variants. | |
hasVariants ( ) : boolean | Tells if this product has variants. | |
removeAttribute ( Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface $attribute ) | Removes an attribute from the collection. | |
removeCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $category ) | Remove category. | |
setAttributes ( Doctrine\Common\Collections\Collection $attributes ) | Sets product attributes. | |
setCategories ( Doctrine\Common\Collections\Collection $categories ) | Set categories. | |
setManufacturer ( Elcodi\Component\Product\Entity\Interfaces\ManufacturerInterface $manufacturer = null ) | Set product manufacturer. | |
setPrincipalCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $principalCategory = null ) | Set the principalCategory. | |
setPrincipalVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $principalVariant ) | Sets product principal variant. | |
setType ( integer $type ) | Sets Type. | |
setVariants ( Doctrine\Common\Collections\Collection $variants ) | Sets product variants. |
public addAttribute ( Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface $attribute ) | ||
$attribute | Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface | Attribute |
public addCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $category ) | ||
$category | Elcodi\Component\Product\Entity\Interfaces\CategoryInterface | Category |
public addVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant ) | ||
$variant | Elcodi\Component\Product\Entity\Interfaces\VariantInterface |
public getAttributes ( ) : Doctrine\Common\Collections\Collection | ||
return | Doctrine\Common\Collections\Collection | Attributes |
public getPrincipalVariant ( ) : Elcodi\Component\Product\Entity\Interfaces\VariantInterface | ||
return | Elcodi\Component\Product\Entity\Interfaces\VariantInterface |
public getPurchasableType ( ) : string | ||
return | string | Purchasable type |
public getVariants ( ) : Doctrine\Common\Collections\Collection | ||
return | Doctrine\Common\Collections\Collection | Variants |
public hasVariants ( ) : boolean | ||
return | boolean | Product has variants |
public removeAttribute ( Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface $attribute ) | ||
$attribute | Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface | Attribute to be removed |
public removeCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $category ) | ||
$category | Elcodi\Component\Product\Entity\Interfaces\CategoryInterface | Category |
public setAttributes ( Doctrine\Common\Collections\Collection $attributes ) | ||
$attributes | Doctrine\Common\Collections\Collection | Attributes |
public setCategories ( Doctrine\Common\Collections\Collection $categories ) | ||
$categories | Doctrine\Common\Collections\Collection | Categories |
public setManufacturer ( Elcodi\Component\Product\Entity\Interfaces\ManufacturerInterface $manufacturer = null ) | ||
$manufacturer | Elcodi\Component\Product\Entity\Interfaces\ManufacturerInterface | Manufacturer |
public setPrincipalCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $principalCategory = null ) | ||
$principalCategory | Elcodi\Component\Product\Entity\Interfaces\CategoryInterface | Principal category |
public setPrincipalVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $principalVariant ) | ||
$principalVariant | Elcodi\Component\Product\Entity\Interfaces\VariantInterface |
public setVariants ( Doctrine\Common\Collections\Collection $variants ) | ||
$variants | Doctrine\Common\Collections\Collection | Variants |
protected Collection,Doctrine\Common\Collections $attributes | ||
return | Doctrine\Common\Collections\Collection |
protected VariantInterface,Elcodi\Component\Product\Entity\Interfaces $principalVariant | ||
return | Elcodi\Component\Product\Entity\Interfaces\VariantInterface |