getMainShopId example

/** * Calls every URL given with the specific context * * @param string[] $urls * @param int $concurrentRequests */
    public function warmUpUrls($urls, Context $context$concurrentRequests = 1)
    {
        $shopId = $context->getShopId();

        $guzzleConfig = [];
        if (!empty($this->getMainShopId($shopId))) {
            $guzzleConfig['Cookie'] = 'shop=' . $shopId;
        }

        $requests = [];
        foreach ($urls as $url) {
            $requests[] = new Request('GET', $url$guzzleConfig);
        }

        $events = $this->eventManager;

        $pool = new Pool(
            
Home | Imprint | This part of the site doesn't use cookies.