PHP Class Elcodi\Component\Product\Entity\Product

Inheritance: extends Elcodi\Component\Core\Entity\Abstracts\AbstractEntity, implements Elcodi\Component\Product\Entity\Interfaces\ProductInterface, use trait Elcodi\Component\Product\Entity\Traits\ProductPriceTrait, use trait Elcodi\Component\Core\Entity\Traits\DateTimeTrait, use trait Elcodi\Component\Core\Entity\Traits\EnabledTrait, use trait Elcodi\Component\Core\Entity\Traits\ETaggableTrait, use trait Elcodi\Component\MetaData\Entity\Traits\MetaDataTrait, use trait Elcodi\Component\Media\Entity\Traits\ImagesContainerTrait, use trait Elcodi\Component\Media\Entity\Traits\PrincipalImageTrait
Afficher le fichier Open project: elcodi/elcodi Class Usage Examples

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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.

Method Details

addAttribute() public méthode

Adds an attribute if not already in the collection.
public addAttribute ( Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface $attribute )
$attribute Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface Attribute

addCategory() public méthode

Add category.
public addCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $category )
$category Elcodi\Component\Product\Entity\Interfaces\CategoryInterface Category

addVariant() public méthode

Adds a Variant for this Product.
public addVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $variant )
$variant Elcodi\Component\Product\Entity\Interfaces\VariantInterface

getAttributes() public méthode

Returns product attributes.
public getAttributes ( ) : Doctrine\Common\Collections\Collection
Résultat Doctrine\Common\Collections\Collection Attributes

getPrincipalVariant() public méthode

Returns product principal variant.
public getPrincipalVariant ( ) : Elcodi\Component\Product\Entity\Interfaces\VariantInterface
Résultat Elcodi\Component\Product\Entity\Interfaces\VariantInterface

getPurchasableType() public méthode

Get purchasable type.
public getPurchasableType ( ) : string
Résultat string Purchasable type

getType() public méthode

Get Type.
public getType ( ) : integer
Résultat integer Type

getVariants() public méthode

Gets product variants.
public getVariants ( ) : Doctrine\Common\Collections\Collection
Résultat Doctrine\Common\Collections\Collection Variants

hasVariants() public méthode

Tells if this product has variants.
public hasVariants ( ) : boolean
Résultat boolean Product has variants

removeAttribute() public méthode

Removes an attribute from the collection.
public removeAttribute ( Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface $attribute )
$attribute Elcodi\Component\Attribute\Entity\Interfaces\AttributeInterface Attribute to be removed

removeCategory() public méthode

Remove category.
public removeCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $category )
$category Elcodi\Component\Product\Entity\Interfaces\CategoryInterface Category

setAttributes() public méthode

Sets product attributes.
public setAttributes ( Doctrine\Common\Collections\Collection $attributes )
$attributes Doctrine\Common\Collections\Collection Attributes

setCategories() public méthode

Set categories.
public setCategories ( Doctrine\Common\Collections\Collection $categories )
$categories Doctrine\Common\Collections\Collection Categories

setManufacturer() public méthode

Set product manufacturer.
public setManufacturer ( Elcodi\Component\Product\Entity\Interfaces\ManufacturerInterface $manufacturer = null )
$manufacturer Elcodi\Component\Product\Entity\Interfaces\ManufacturerInterface Manufacturer

setPrincipalCategory() public méthode

Set the principalCategory.
public setPrincipalCategory ( Elcodi\Component\Product\Entity\Interfaces\CategoryInterface $principalCategory = null )
$principalCategory Elcodi\Component\Product\Entity\Interfaces\CategoryInterface Principal category

setPrincipalVariant() public méthode

Sets product principal variant.
public setPrincipalVariant ( Elcodi\Component\Product\Entity\Interfaces\VariantInterface $principalVariant )
$principalVariant Elcodi\Component\Product\Entity\Interfaces\VariantInterface

setType() public méthode

Sets Type.
public setType ( integer $type )
$type integer Type

setVariants() public méthode

Sets product variants.
public setVariants ( Doctrine\Common\Collections\Collection $variants )
$variants Doctrine\Common\Collections\Collection Variants

Property Details

$attributes protected_oe property

Attributes associated with this product
protected Collection,Doctrine\Common\Collections $attributes
Résultat Doctrine\Common\Collections\Collection

$principalVariant protected_oe property

Principal variant for this product
protected VariantInterface,Elcodi\Component\Product\Entity\Interfaces $principalVariant
Résultat Elcodi\Component\Product\Entity\Interfaces\VariantInterface

$type protected_oe property

Product type
protected int $type
Résultat integer

$variants protected_oe property

Variants for this product
protected Collection,Doctrine\Common\Collections $variants
Résultat Doctrine\Common\Collections\Collection