PHP Класс Elcodi\Component\Product\Entity\Product

Наследование: 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
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
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.

Описание методов

addAttribute() публичный Метод

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() публичный Метод

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

addVariant() публичный Метод

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

getAttributes() публичный Метод

Returns product attributes.
public getAttributes ( ) : Doctrine\Common\Collections\Collection
Результат Doctrine\Common\Collections\Collection Attributes

getPrincipalVariant() публичный Метод

Returns product principal variant.
public getPrincipalVariant ( ) : Elcodi\Component\Product\Entity\Interfaces\VariantInterface
Результат Elcodi\Component\Product\Entity\Interfaces\VariantInterface

getPurchasableType() публичный Метод

Get purchasable type.
public getPurchasableType ( ) : string
Результат string Purchasable type

getType() публичный Метод

Get Type.
public getType ( ) : integer
Результат integer Type

getVariants() публичный Метод

Gets product variants.
public getVariants ( ) : Doctrine\Common\Collections\Collection
Результат Doctrine\Common\Collections\Collection Variants

hasVariants() публичный Метод

Tells if this product has variants.
public hasVariants ( ) : boolean
Результат boolean Product has variants

removeAttribute() публичный Метод

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() публичный Метод

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

setAttributes() публичный Метод

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

setCategories() публичный Метод

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

setManufacturer() публичный Метод

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

setPrincipalCategory() публичный Метод

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

setPrincipalVariant() публичный Метод

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

setType() публичный Метод

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

setVariants() публичный Метод

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

Описание свойств

$attributes защищенное свойство

Attributes associated with this product
protected Collection,Doctrine\Common\Collections $attributes
Результат Doctrine\Common\Collections\Collection

$principalVariant защищенное свойство

Principal variant for this product
protected VariantInterface,Elcodi\Component\Product\Entity\Interfaces $principalVariant
Результат Elcodi\Component\Product\Entity\Interfaces\VariantInterface

$type защищенное свойство

Product type
protected int $type
Результат integer

$variants защищенное свойство

Variants for this product
protected Collection,Doctrine\Common\Collections $variants
Результат Doctrine\Common\Collections\Collection