PHP Interface Sonata\Component\Product\ProductManagerInterface

Inheritance: extends Sonata\CoreBundle\Model\ManagerInterface, extends Sonata\CoreBundle\Model\PageableManagerInterface
Mostra file Open project: sonata-project/ecommerce Interface Usage Examples

Public Methods

Method Description
findEnabledFromIdAndSlug ( integer $id, string $slug ) : Sonata\Component\Product\ProductInterface | null Retrieve an active product from its id and its slug.
findInSameCollections ( mixed $productCollections ) : array Returns the products in the same collections as those specified in $productCollections.
findParentsInSameCollections ( mixed $productCollections ) : array Returns the parent products in the same collections as those specified in $productCollections.
findVariations ( Sonata\Component\Product\ProductInterface $product ) : array
updateStock ( Sonata\Component\Product\ProductInterface | integer $product, integer $diff ) Updated stock value for a given Product.

Method Details

findEnabledFromIdAndSlug() public method

Retrieve an active product from its id and its slug.
public findEnabledFromIdAndSlug ( integer $id, string $slug ) : Sonata\Component\Product\ProductInterface | null
$id integer
$slug string
return Sonata\Component\Product\ProductInterface | null

findInSameCollections() public method

Returns the products in the same collections as those specified in $productCollections.
public findInSameCollections ( mixed $productCollections ) : array
$productCollections mixed
return array

findParentsInSameCollections() public method

Returns the parent products in the same collections as those specified in $productCollections.
public findParentsInSameCollections ( mixed $productCollections ) : array
$productCollections mixed
return array

findVariations() public method

public findVariations ( Sonata\Component\Product\ProductInterface $product ) : array
$product Sonata\Component\Product\ProductInterface
return array

updateStock() public method

Updated stock value for a given Product.
public updateStock ( Sonata\Component\Product\ProductInterface | integer $product, integer $diff )
$product Sonata\Component\Product\ProductInterface | integer
$diff integer