/** * {@inheritdoc} */ public function generate($category) { $this->category = $category; $storeId = $this->category->getStoreId(); $urls = $this->catalogUrlRewriteHelper->isDefaultStore($storeId) ? $this->generateForDefaultStore() : $this->generateForStore($storeId); $this->category = null; return $urls; }
/** * {@inheritdoc} */ public function generate($product) { $this->product = $product; $storeId = $this->product->getStoreId(); $urls = $this->catalogUrlRewriteHelper->isDefaultStore($storeId) ? $this->generateForDefaultStore() : $this->generateForStore($storeId); $this->product = null; $this->categories = null; return $urls; }