PHP Interface Sonata\Component\Product\ProductManagerInterface

Inheritance: extends Sonata\CoreBundle\Model\ManagerInterface, extends Sonata\CoreBundle\Model\PageableManagerInterface
Afficher le fichier Open project: sonata-project/ecommerce Interface Usage Examples

Méthodes publiques

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

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
Résultat Sonata\Component\Product\ProductInterface | null

findInSameCollections() public méthode

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

findParentsInSameCollections() public méthode

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

findVariations() public méthode

public findVariations ( Sonata\Component\Product\ProductInterface $product ) : array
$product Sonata\Component\Product\ProductInterface
Résultat array

updateStock() public méthode

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