public function findByRequest(Request $request)
    {
        $qb = $this->createQueryBuilder('s');

        if ($request->get('attribute')) {
            $qb->join('s.allowedInAttributes', 'a')
                ->andWhere('a.id = :attributeId')
                ->setParameter('attributeId', $request->get('attribute'));
        }

        return $qb->getQuery()->getArrayResult();
    }
public function findByRequest(Request $request)
    {
        $qb = $this->createQueryBuilder('s');

        if ($request->get('attribute')) {
            $qb->join('s.allowedInAttributes', 'a')
                ->andWhere('a.id = :attributeId')
                ->setParameter('attributeId', $request->get('attribute'));
        }

        return $qb->getQuery()->getArrayResult();
    }
public function findByRequest ( Request $ request ) { $ qb = $ this -> createQueryBuilder ( 's' ) ; if ( $ request -> get ( 'attribute' ) ) { $ qb -> join ( 's.allowedInAttributes' , 'a' ) -> andWhere ( 'a.id = :attributeId' ) -> setParameter ( 'attributeId' , $ request -> get ( 'attribute' ) ) ; } return $ qb -> getQuery ( ) -> getArrayResult ( ) ; }
Find schemas by request

@param Request $request

@return \Doctrine\Common\Collections\ArrayCollection
Find schemas by request