public function findAttributeValues($product)
    {
        // select
        $qb = $this->getQueryBuilder()
            ->select('a.name attributeName, av.name, i.path imagePath');

        // join
        $qb->join('p.attributeValues', 'av')
            ->join('av.attribute', 'a')
            ->leftJoin('av.image', 'i');

        // where
        $qb->andWhere('p = :product')
            ->setParameter('product', $product);

        // order by
        $qb->orderBy('a.order', 'asc');

        return $qb->getQuery()
            ->getResult();
    }
public function findAttributeValues($product)
    {
        // select
        $qb = $this->getQueryBuilder()
            ->select('a.name attributeName, av.name, i.path imagePath');

        // join
        $qb->join('p.attributeValues', 'av')
            ->join('av.attribute', 'a')
            ->leftJoin('av.image', 'i');

        // where
        $qb->andWhere('p = :product')
            ->setParameter('product', $product);

        // order by
        $qb->orderBy('a.order', 'asc');

        return $qb->getQuery()
            ->getResult();
    }
public function findAttributeValues ( $ product ) { // select $ qb = $ this -> getQueryBuilder ( ) -> select ( 'a.name attributeName, av.name, i.path imagePath' ) ; // join $ qb -> join ( 'p.attributeValues' , 'av' ) -> join ( 'av.attribute' , 'a' ) -> leftJoin ( 'av.image' , 'i' ) ; // where $ qb -> andWhere ( 'p = :product' ) -> setParameter ( 'product' , $ product ) ; // order by $ qb -> orderBy ( 'a.order' , 'asc' ) ; return $ qb -> getQuery ( ) -> getResult ( ) ; }
Find sorted attribute values

@param Product $product

@return ArrayCollection
Find sorted attribute values