diff --git a/Api/PrerenderClientInterface.php b/Api/PrerenderClientInterface.php index ae3b120..34791fa 100644 --- a/Api/PrerenderClientInterface.php +++ b/Api/PrerenderClientInterface.php @@ -8,5 +8,12 @@ interface PrerenderClientInterface { + /** + * Call Prerender service API to recache list of URLs + * + * @param array $urls + * @param int $storeId + * @return void + */ public function recacheUrls(array $urls, int $storeId): void; } diff --git a/Model/Url/GetUrlsForCategories.php b/Model/Url/GetUrlsForCategories.php index db836dd..41e56ab 100644 --- a/Model/Url/GetUrlsForCategories.php +++ b/Model/Url/GetUrlsForCategories.php @@ -9,7 +9,6 @@ use Magento\Catalog\Model\Category; use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Url; use Magento\Store\Model\App\Emulation; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; @@ -25,9 +24,6 @@ class GetUrlsForCategories /** @var Emulation */ private Emulation $emulation; - /** @var Url */ - private Url $url; - /** * * @param CollectionFactory $categoryCollectionFactory @@ -37,13 +33,11 @@ class GetUrlsForCategories public function __construct( CollectionFactory $categoryCollectionFactory, StoreManagerInterface $storeManager, - Emulation $emulation, - Url $url + Emulation $emulation ) { $this->categoryCollectionFactory = $categoryCollectionFactory; $this->storeManager = $storeManager; $this->emulation = $emulation; - $this->url = $url; } /** diff --git a/Model/Url/GetUrlsForProducts.php b/Model/Url/GetUrlsForProducts.php index 6b3a086..3aa945f 100644 --- a/Model/Url/GetUrlsForProducts.php +++ b/Model/Url/GetUrlsForProducts.php @@ -4,12 +4,12 @@ */ declare(strict_types=1); + namespace Aligent\Prerender\Model\Url; use Magento\Catalog\Model\Product; use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Url; use Magento\Store\Model\App\Emulation; use Magento\Store\Model\Store; use Magento\Store\Model\StoreManagerInterface; @@ -25,9 +25,6 @@ class GetUrlsForProducts /** @var Emulation */ private Emulation $emulation; - /** @var Url */ - private Url $url; - /** * * @param CollectionFactory $productCollectionFactory @@ -37,13 +34,11 @@ class GetUrlsForProducts public function __construct( CollectionFactory $productCollectionFactory, StoreManagerInterface $storeManager, - Emulation $emulation, - Url $url + Emulation $emulation ) { $this->productCollectionFactory = $productCollectionFactory; $this->storeManager = $storeManager; $this->emulation = $emulation; - $this->url = $url; } /**