Sonata\ProductBundle\Entity\ProductManager::findVariations PHP Method

findVariations() public method

public findVariations ( Sonata\Component\Product\ProductInterface $product )
$product Sonata\Component\Product\ProductInterface
    public function findVariations(ProductInterface $product)
    {
        $queryBuilder = $this->getRepository()->createQueryBuilder('p')->where('p.parent = :parent')->andWhere('p.enabled = :enabled')->setParameter('parent', $product)->setParameter('enabled', true);
        return $queryBuilder->getQuery()->execute();
    }