WellCommerce\Bundle\ShopBundle\Repository\ShopRepository::resolve PHP Method

resolve() public method

public resolve ( integer $currentShopId, string $url ) : WellCommerce\Bundle\ShopBundle\Entity\ShopInterface
$currentShopId integer
$url string
return WellCommerce\Bundle\ShopBundle\Entity\ShopInterface
    public function resolve(int $currentShopId, string $url) : ShopInterface
    {
        $criteria = new Criteria();
        $criteria->where($criteria->expr()->eq('id', $currentShopId));
        $criteria->orWhere($criteria->expr()->eq('url', $url));
        $criteria->orWhere($criteria->expr()->gte('id', 1));
        return $this->matching($criteria)->first();
    }