PHP Class Sylius\Component\Core\Model\Product

Author: Paweł Jędrzejewski ([email protected])
Author: Gonzalo Vilaseca ([email protected])
Author: Anna Walasek ([email protected])
Inheritance: extends Sylius\Component\Product\Model\Product, implements Sylius\Component\Core\Model\ProductInterface
Show file Open project: sylius/sylius Class Usage Examples

Protected Properties

Property Type Description
$averageRating float
$channels Sylius\Component\Core\Model\ChannelInterface[] | Doctrine\Common\Collections\Collection
$images Doctrine\Common\Collections\Collection | Sylius\Component\Core\Model\ImageInterface[]
$mainTaxon Sylius\Component\Taxonomy\Model\TaxonInterface
$productTaxons Doctrine\Common\Collections\Collection | Sylius\Component\Core\Model\ProductTaxonInterface[]
$reviews Doctrine\Common\Collections\Collection | Sylius\Component\Review\Model\ReviewInterface[]
$variantSelectionMethod string

Public Methods

Method Description
__construct ( )
addChannel ( Sylius\Component\Channel\Model\ChannelInterface $channel )
addImage ( Sylius\Component\Core\Model\ImageInterface $image )
addProductTaxon ( Sylius\Component\Core\Model\ProductTaxonInterface $productTaxon )
addReview ( Sylius\Component\Review\Model\ReviewInterface $review )
filterProductTaxonsByTaxon ( Sylius\Component\Core\Model\TaxonInterface $taxon )
getAcceptedReviews ( )
getAverageRating ( )
getChannels ( )
getImageByCode ( $code )
getImages ( )
getMainTaxon ( )
getProductTaxons ( )
getReviews ( )
getShortDescription ( )
getVariantSelectionMethod ( )
getVariantSelectionMethodLabel ( )
getVariantSelectionMethodLabels ( )
hasChannel ( Sylius\Component\Channel\Model\ChannelInterface $channel )
hasImage ( Sylius\Component\Core\Model\ImageInterface $image )
hasImages ( )
hasProductTaxon ( Sylius\Component\Core\Model\ProductTaxonInterface $productTaxon )
isVariantSelectionMethodChoice ( )
removeChannel ( Sylius\Component\Channel\Model\ChannelInterface $channel )
removeImage ( Sylius\Component\Core\Model\ImageInterface $image )
removeProductTaxon ( Sylius\Component\Core\Model\ProductTaxonInterface $productTaxon )
removeReview ( Sylius\Component\Review\Model\ReviewInterface $review )
setAverageRating ( $averageRating )
setMainTaxon ( Sylius\Component\Core\Model\TaxonInterface $mainTaxon = null )
setShortDescription ( $shortDescription )
setVariantSelectionMethod ( $variantSelectionMethod )

Protected Methods

Method Description
createTranslation ( )

Method Details

__construct() public method

public __construct ( )

addChannel() public method

public addChannel ( Sylius\Component\Channel\Model\ChannelInterface $channel )
$channel Sylius\Component\Channel\Model\ChannelInterface

addImage() public method

public addImage ( Sylius\Component\Core\Model\ImageInterface $image )
$image Sylius\Component\Core\Model\ImageInterface

addProductTaxon() public method

public addProductTaxon ( Sylius\Component\Core\Model\ProductTaxonInterface $productTaxon )
$productTaxon Sylius\Component\Core\Model\ProductTaxonInterface

addReview() public method

public addReview ( Sylius\Component\Review\Model\ReviewInterface $review )
$review Sylius\Component\Review\Model\ReviewInterface

createTranslation() protected method

protected createTranslation ( )

filterProductTaxonsByTaxon() public method

public filterProductTaxonsByTaxon ( Sylius\Component\Core\Model\TaxonInterface $taxon )
$taxon Sylius\Component\Core\Model\TaxonInterface

getAcceptedReviews() public method

public getAcceptedReviews ( )

getAverageRating() public method

public getAverageRating ( )

getChannels() public method

public getChannels ( )

getImageByCode() public method

public getImageByCode ( $code )

getImages() public method

public getImages ( )

getMainTaxon() public method

public getMainTaxon ( )

getProductTaxons() public method

public getProductTaxons ( )

getReviews() public method

public getReviews ( )

getShortDescription() public method

public getShortDescription ( )

getVariantSelectionMethod() public method

getVariantSelectionMethodLabel() public method

getVariantSelectionMethodLabels() public static method

hasChannel() public method

public hasChannel ( Sylius\Component\Channel\Model\ChannelInterface $channel )
$channel Sylius\Component\Channel\Model\ChannelInterface

hasImage() public method

public hasImage ( Sylius\Component\Core\Model\ImageInterface $image )
$image Sylius\Component\Core\Model\ImageInterface

hasImages() public method

public hasImages ( )

hasProductTaxon() public method

public hasProductTaxon ( Sylius\Component\Core\Model\ProductTaxonInterface $productTaxon )
$productTaxon Sylius\Component\Core\Model\ProductTaxonInterface

isVariantSelectionMethodChoice() public method

removeChannel() public method

public removeChannel ( Sylius\Component\Channel\Model\ChannelInterface $channel )
$channel Sylius\Component\Channel\Model\ChannelInterface

removeImage() public method

public removeImage ( Sylius\Component\Core\Model\ImageInterface $image )
$image Sylius\Component\Core\Model\ImageInterface

removeProductTaxon() public method

public removeProductTaxon ( Sylius\Component\Core\Model\ProductTaxonInterface $productTaxon )
$productTaxon Sylius\Component\Core\Model\ProductTaxonInterface

removeReview() public method

public removeReview ( Sylius\Component\Review\Model\ReviewInterface $review )
$review Sylius\Component\Review\Model\ReviewInterface

setAverageRating() public method

public setAverageRating ( $averageRating )

setMainTaxon() public method

public setMainTaxon ( Sylius\Component\Core\Model\TaxonInterface $mainTaxon = null )
$mainTaxon Sylius\Component\Core\Model\TaxonInterface

setShortDescription() public method

public setShortDescription ( $shortDescription )

setVariantSelectionMethod() public method

public setVariantSelectionMethod ( $variantSelectionMethod )

Property Details

$averageRating protected property

protected float $averageRating
return float

$channels protected property

protected ChannelInterface[],Sylius\Component\Core\Model|Collection,Doctrine\Common\Collections $channels
return Sylius\Component\Core\Model\ChannelInterface[] | Doctrine\Common\Collections\Collection

$images protected property

protected Collection,Doctrine\Common\Collections|ImageInterface[],Sylius\Component\Core\Model $images
return Doctrine\Common\Collections\Collection | Sylius\Component\Core\Model\ImageInterface[]

$mainTaxon protected property

protected TaxonInterface,Sylius\Component\Taxonomy\Model $mainTaxon
return Sylius\Component\Taxonomy\Model\TaxonInterface

$productTaxons protected property

protected Collection,Doctrine\Common\Collections|ProductTaxonInterface[],Sylius\Component\Core\Model $productTaxons
return Doctrine\Common\Collections\Collection | Sylius\Component\Core\Model\ProductTaxonInterface[]

$reviews protected property

protected Collection,Doctrine\Common\Collections|ReviewInterface[],Sylius\Component\Review\Model $reviews
return Doctrine\Common\Collections\Collection | Sylius\Component\Review\Model\ReviewInterface[]

$variantSelectionMethod protected property

protected string $variantSelectionMethod
return string