PHP Class Sonata\ProductBundle\Entity\BaseProduct

Inheritance: implements Sonata\Component\Product\ProductInterface
Show file Open project: sonata-project/ecommerce

Protected Properties

Property Type Description
$createdAt DateTime
$deliveries Doctrine\Common\Collections\ArrayCollection
$description string
$descriptionFormatter string
$enabled boolean
$enabledVariations Doctrine\Common\Collections\ArrayCollection
$gallery Sonata\MediaBundle\Model\GalleryInterface
$image Sonata\MediaBundle\Model\MediaInterface
$name string
$options array
$packages Doctrine\Common\Collections\ArrayCollection
$parent Sonata\Component\Product\ProductInterface
$price float
$priceIncludingVat boolean
$productCategories Doctrine\Common\Collections\ArrayCollection
$productCollections Doctrine\Common\Collections\ArrayCollection
$rawDescription string
$rawShortDescription string
$shortDescription string
$shortDescriptionFormatter string
$sku string
$slug string
$stock integer
$updatedAt DateTime
$variations Doctrine\Common\Collections\ArrayCollection
$vatRate float

Public Methods

Method Description
__construct ( ) Constructor.
__toString ( )
addDeliverie ( Sonata\Component\Product\DeliveryInterface $delivery )
addDelivery ( Sonata\Component\Product\DeliveryInterface $delivery )
addPackage ( Sonata\Component\Product\PackageInterface $package )
addProductCategorie ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
addProductCategory ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
addProductCollection ( Sonata\Component\Product\ProductCollectionInterface $productCollection )
addVariation ( Sonata\Component\Product\ProductInterface $variation )
fromArray ( $array )
getCategories ( )
getCollections ( )
getCreatedAt ( )
getDeliveries ( )
getDescription ( )
getDescriptionFormatter ( )
getEnabled ( )
getGallery ( )
getImage ( )
getMainCategory ( )
getName ( )
getOptions ( )
getPackages ( )
getParent ( )
getPrice ( $vat = false )
getProductCategories ( )
getProductCollections ( )
getQuantity ( )
getRawDescription ( )
getRawShortDescription ( )
getShortDescription ( )
getShortDescriptionFormatter ( )
getSku ( )
getSlug ( )
getStock ( )
getUnitPrice ( $vat = false )
getUpdatedAt ( )
getVariations ( )
getVatRate ( )
hasOneMainCategory ( )
hasVariations ( )
isEnabled ( )
isMaster ( )
isPriceIncludingVat ( )
isRecurrentPayment ( )
isSalable ( )
isVariation ( )
prePersist ( )
preUpdate ( )
removeDeliverie ( Sonata\Component\Product\DeliveryInterface $delivery )
removeDelivery ( Sonata\Component\Product\DeliveryInterface $delivery )
removePackage ( Sonata\Component\Product\PackageInterface $package )
removeProductCategorie ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
removeProductCategory ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
removeProductCollection ( Sonata\Component\Product\ProductCollectionInterface $productCollection )
removeVariation ( Sonata\Component\Product\ProductInterface $variation )
setCreatedAt ( DateTime $createdAt = null )
setDeliveries ( ArrayCollection $deliveries )
setDescription ( $description )
setDescriptionFormatter ( $descriptionFormatter )
setEnabled ( $enabled )
setGallery ( Sonata\MediaBundle\Model\GalleryInterface $gallery = null )
setImage ( Sonata\MediaBundle\Model\MediaInterface $image = null )
setName ( $name )
setOptions ( array $options )
setPackages ( ArrayCollection $packages )
setParent ( Sonata\Component\Product\ProductInterface $parent )
setPrice ( $price )
setPriceIncludingVat ( $priceIncludingVat )
setProductCategories ( ArrayCollection $productCategories )
setProductCollections ( ArrayCollection $productCollections )
setQuantity ( $quantity )
setRawDescription ( $rawDescription )
setRawShortDescription ( $rawShortDescription )
setShortDescription ( $shortDescription )
setShortDescriptionFormatter ( $shortDescriptionFormatter )
setSku ( $sku )
setSlug ( $slug )
setStock ( $stock )
setUnitPrice ( $unitPrice )
setUpdatedAt ( DateTime $updatedAt = null )
setVariations ( ArrayCollection $variations )
setVatRate ( $vatRate )
slugify ( $text ) : mixed | string source : http://snipplr.com/view/22741/slugify-a-string-in-php/.
toArray ( )
validateOneMainCategory ( Symfony\Component\Validator\ExecutionContextInterface $context )

Method Details

__construct() public method

Constructor.
public __construct ( )

__toString() public method

public __toString ( )

addDeliverie() public method

public addDeliverie ( Sonata\Component\Product\DeliveryInterface $delivery )
$delivery Sonata\Component\Product\DeliveryInterface

addDelivery() public method

public addDelivery ( Sonata\Component\Product\DeliveryInterface $delivery )
$delivery Sonata\Component\Product\DeliveryInterface

addPackage() public method

public addPackage ( Sonata\Component\Product\PackageInterface $package )
$package Sonata\Component\Product\PackageInterface

addProductCategorie() public method

public addProductCategorie ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
$productCategory Sonata\Component\Product\ProductCategoryInterface

addProductCategory() public method

public addProductCategory ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
$productCategory Sonata\Component\Product\ProductCategoryInterface

addProductCollection() public method

public addProductCollection ( Sonata\Component\Product\ProductCollectionInterface $productCollection )
$productCollection Sonata\Component\Product\ProductCollectionInterface

addVariation() public method

public addVariation ( Sonata\Component\Product\ProductInterface $variation )
$variation Sonata\Component\Product\ProductInterface

fromArray() public method

public fromArray ( $array )

getCategories() public method

public getCategories ( )

getCollections() public method

public getCollections ( )

getCreatedAt() public method

public getCreatedAt ( )

getDeliveries() public method

public getDeliveries ( )

getDescription() public method

public getDescription ( )

getDescriptionFormatter() public method

getEnabled() public method

public getEnabled ( )

getGallery() public method

public getGallery ( )

getImage() public method

public getImage ( )

getMainCategory() public method

public getMainCategory ( )

getName() public method

public getName ( )

getOptions() public method

public getOptions ( )

getPackages() public method

public getPackages ( )

getParent() public method

public getParent ( )

getPrice() public method

public getPrice ( $vat = false )

getProductCategories() public method

getProductCollections() public method

getQuantity() public method

public getQuantity ( )

getRawDescription() public method

public getRawDescription ( )

getRawShortDescription() public method

getShortDescription() public method

public getShortDescription ( )

getShortDescriptionFormatter() public method

getSku() public method

public getSku ( )

getSlug() public method

public getSlug ( )

getStock() public method

public getStock ( )

getUnitPrice() public method

public getUnitPrice ( $vat = false )

getUpdatedAt() public method

public getUpdatedAt ( )

getVariations() public method

public getVariations ( )

getVatRate() public method

public getVatRate ( )

hasOneMainCategory() public method

public hasOneMainCategory ( )

hasVariations() public method

public hasVariations ( )

isEnabled() public method

public isEnabled ( )

isMaster() public method

public isMaster ( )

isPriceIncludingVat() public method

public isPriceIncludingVat ( )

isRecurrentPayment() public method

public isRecurrentPayment ( )

isSalable() public method

public isSalable ( )

isVariation() public method

public isVariation ( )

prePersist() public method

public prePersist ( )

preUpdate() public method

public preUpdate ( )

removeDeliverie() public method

public removeDeliverie ( Sonata\Component\Product\DeliveryInterface $delivery )
$delivery Sonata\Component\Product\DeliveryInterface

removeDelivery() public method

public removeDelivery ( Sonata\Component\Product\DeliveryInterface $delivery )
$delivery Sonata\Component\Product\DeliveryInterface

removePackage() public method

public removePackage ( Sonata\Component\Product\PackageInterface $package )
$package Sonata\Component\Product\PackageInterface

removeProductCategorie() public method

public removeProductCategorie ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
$productCategory Sonata\Component\Product\ProductCategoryInterface

removeProductCategory() public method

public removeProductCategory ( Sonata\Component\Product\ProductCategoryInterface $productCategory )
$productCategory Sonata\Component\Product\ProductCategoryInterface

removeProductCollection() public method

public removeProductCollection ( Sonata\Component\Product\ProductCollectionInterface $productCollection )
$productCollection Sonata\Component\Product\ProductCollectionInterface

removeVariation() public method

public removeVariation ( Sonata\Component\Product\ProductInterface $variation )
$variation Sonata\Component\Product\ProductInterface

setCreatedAt() public method

public setCreatedAt ( DateTime $createdAt = null )
$createdAt DateTime

setDeliveries() public method

public setDeliveries ( ArrayCollection $deliveries )
$deliveries Doctrine\Common\Collections\ArrayCollection

setDescription() public method

public setDescription ( $description )

setDescriptionFormatter() public method

public setDescriptionFormatter ( $descriptionFormatter )

setEnabled() public method

public setEnabled ( $enabled )

setGallery() public method

public setGallery ( Sonata\MediaBundle\Model\GalleryInterface $gallery = null )
$gallery Sonata\MediaBundle\Model\GalleryInterface

setImage() public method

public setImage ( Sonata\MediaBundle\Model\MediaInterface $image = null )
$image Sonata\MediaBundle\Model\MediaInterface

setName() public method

public setName ( $name )

setOptions() public method

public setOptions ( array $options )
$options array

setPackages() public method

public setPackages ( ArrayCollection $packages )
$packages Doctrine\Common\Collections\ArrayCollection

setParent() public method

public setParent ( Sonata\Component\Product\ProductInterface $parent )
$parent Sonata\Component\Product\ProductInterface

setPrice() public method

public setPrice ( $price )

setPriceIncludingVat() public method

public setPriceIncludingVat ( $priceIncludingVat )

setProductCategories() public method

public setProductCategories ( ArrayCollection $productCategories )
$productCategories Doctrine\Common\Collections\ArrayCollection

setProductCollections() public method

public setProductCollections ( ArrayCollection $productCollections )
$productCollections Doctrine\Common\Collections\ArrayCollection

setQuantity() public method

public setQuantity ( $quantity )

setRawDescription() public method

public setRawDescription ( $rawDescription )

setRawShortDescription() public method

public setRawShortDescription ( $rawShortDescription )

setShortDescription() public method

public setShortDescription ( $shortDescription )

setShortDescriptionFormatter() public method

public setShortDescriptionFormatter ( $shortDescriptionFormatter )

setSku() public method

public setSku ( $sku )

setSlug() public method

public setSlug ( $slug )

setStock() public method

public setStock ( $stock )

setUnitPrice() public method

public setUnitPrice ( $unitPrice )

setUpdatedAt() public method

public setUpdatedAt ( DateTime $updatedAt = null )
$updatedAt DateTime

setVariations() public method

public setVariations ( ArrayCollection $variations )
$variations Doctrine\Common\Collections\ArrayCollection

setVatRate() public method

public setVatRate ( $vatRate )

slugify() public static method

source : http://snipplr.com/view/22741/slugify-a-string-in-php/.
public static slugify ( $text ) : mixed | string
$text
return mixed | string

toArray() public method

public toArray ( )

validateOneMainCategory() public method

public validateOneMainCategory ( Symfony\Component\Validator\ExecutionContextInterface $context )
$context Symfony\Component\Validator\ExecutionContextInterface

Property Details

$createdAt protected property

protected DateTime $createdAt
return DateTime

$deliveries protected property

protected ArrayCollection,Doctrine\Common\Collections $deliveries
return Doctrine\Common\Collections\ArrayCollection

$description protected property

protected string $description
return string

$descriptionFormatter protected property

protected string $descriptionFormatter
return string

$enabled protected property

protected bool $enabled
return boolean

$enabledVariations protected property

protected ArrayCollection,Doctrine\Common\Collections $enabledVariations
return Doctrine\Common\Collections\ArrayCollection

$image protected property

protected MediaInterface,Sonata\MediaBundle\Model $image
return Sonata\MediaBundle\Model\MediaInterface

$name protected property

protected string $name
return string

$options protected property

protected array $options
return array

$packages protected property

protected ArrayCollection,Doctrine\Common\Collections $packages
return Doctrine\Common\Collections\ArrayCollection

$parent protected property

protected ProductInterface,Sonata\Component\Product $parent
return Sonata\Component\Product\ProductInterface

$price protected property

protected float $price
return float

$priceIncludingVat protected property

protected bool $priceIncludingVat
return boolean

$productCategories protected property

protected ArrayCollection,Doctrine\Common\Collections $productCategories
return Doctrine\Common\Collections\ArrayCollection

$productCollections protected property

protected ArrayCollection,Doctrine\Common\Collections $productCollections
return Doctrine\Common\Collections\ArrayCollection

$rawDescription protected property

protected string $rawDescription
return string

$rawShortDescription protected property

protected string $rawShortDescription
return string

$shortDescription protected property

protected string $shortDescription
return string

$shortDescriptionFormatter protected property

protected string $shortDescriptionFormatter
return string

$sku protected property

protected string $sku
return string

$slug protected property

protected string $slug
return string

$stock protected property

protected int $stock
return integer

$updatedAt protected property

protected DateTime $updatedAt
return DateTime

$variations protected property

protected ArrayCollection,Doctrine\Common\Collections $variations
return Doctrine\Common\Collections\ArrayCollection

$vatRate protected property

protected float $vatRate
return float