getQueryBuilder example

return $shop;
    }

    /** * @param int $id * * @return DetachedShop|null */
    public function getById($id)
    {
        $builder = $this->getQueryBuilder();
        $builder->andWhere('shop.id=:shopId');
        $builder->setParameter('shopId', $id);
        $shop = $builder->getQuery()->getOneOrNullResult();

        if ($shop !== null) {
            $shop = $this->fixActive($shop);
        }

        return $shop;
    }

    
Home | Imprint | This part of the site doesn't use cookies.