PHP 클래스 Sonata\ProductBundle\Entity\ProductManager

상속: extends Sonata\CoreBundle\Model\BaseEntityManager, implements Sonata\Component\Product\ProductManagerInterface
파일 보기 프로젝트 열기: sonata-project/ecommerce

공개 메소드들

메소드 설명
findEnabledFromIdAndSlug ( integer $id, string $slug ) : Sonata\Component\Product\ProductInterface | null Retrieve an active product from its id and its slug.
findInSameCollections ( $productCollections, $limit = null )
findParentsInSameCollections ( $productCollections, $limit = null )
findProductForCategory ( Sonata\ClassificationBundle\Model\CategoryInterface $category ) : Sonata\Component\Product\ProductInterface | null Returns partial product example (only to get its class) from $category.
findVariations ( Sonata\Component\Product\ProductInterface $product )
getCategoryActiveProductsQueryBuilder ( Sonata\ClassificationBundle\Model\CategoryInterface $category = null, string $filter = null, mixed $option = null ) : Doctrine\ORM\QueryBuilder Returns active products for a given category.
getPager ( array $criteria, $page, $limit = 10, array $sort = [] )
updateStock ( $product, $diff )

보호된 메소드들

메소드 설명
getCategoryProductsQueryBuilder ( Sonata\ClassificationBundle\Model\CategoryInterface $category = null ) : Doctrine\ORM\QueryBuilder Returns QueryBuilder for products.
queryInSameCollections ( array $productCollections, null | integer $limit = null ) : Doctrine\ORM\QueryBuilder

메소드 상세

findEnabledFromIdAndSlug() 공개 메소드

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
리턴 Sonata\Component\Product\ProductInterface | null

findInSameCollections() 공개 메소드

public findInSameCollections ( $productCollections, $limit = null )

findParentsInSameCollections() 공개 메소드

public findParentsInSameCollections ( $productCollections, $limit = null )

findProductForCategory() 공개 메소드

Returns partial product example (only to get its class) from $category.
public findProductForCategory ( Sonata\ClassificationBundle\Model\CategoryInterface $category ) : Sonata\Component\Product\ProductInterface | null
$category Sonata\ClassificationBundle\Model\CategoryInterface
리턴 Sonata\Component\Product\ProductInterface | null

findVariations() 공개 메소드

public findVariations ( Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface

getCategoryActiveProductsQueryBuilder() 공개 메소드

Returns active products for a given category.
public getCategoryActiveProductsQueryBuilder ( Sonata\ClassificationBundle\Model\CategoryInterface $category = null, string $filter = null, mixed $option = null ) : Doctrine\ORM\QueryBuilder
$category Sonata\ClassificationBundle\Model\CategoryInterface
$filter string
$option mixed
리턴 Doctrine\ORM\QueryBuilder

getCategoryProductsQueryBuilder() 보호된 메소드

Returns QueryBuilder for products.
protected getCategoryProductsQueryBuilder ( Sonata\ClassificationBundle\Model\CategoryInterface $category = null ) : Doctrine\ORM\QueryBuilder
$category Sonata\ClassificationBundle\Model\CategoryInterface
리턴 Doctrine\ORM\QueryBuilder

getPager() 공개 메소드

public getPager ( array $criteria, $page, $limit = 10, array $sort = [] )
$criteria array
$sort array

queryInSameCollections() 보호된 메소드

protected queryInSameCollections ( array $productCollections, null | integer $limit = null ) : Doctrine\ORM\QueryBuilder
$productCollections array
$limit null | integer
리턴 Doctrine\ORM\QueryBuilder

updateStock() 공개 메소드

public updateStock ( $product, $diff )