Exemple #1
0
 /**
  * Create url rewrite object
  *
  * @param string $entityType
  * @param int $entityId
  * @param int $storeId
  * @param string $requestPath
  * @param string $targetPath
  * @param string|null $redirectType Null or one of OptionProvider const
  * @return UrlRewrite
  */
 public function createUrlRewrite($entityType, $entityId, $storeId, $requestPath, $targetPath, $redirectType = null)
 {
     return $this->converter->convertArrayToObject([UrlRewrite::ENTITY_TYPE => $entityType, UrlRewrite::ENTITY_ID => $entityId, UrlRewrite::STORE_ID => $storeId, UrlRewrite::REQUEST_PATH => $requestPath, UrlRewrite::TARGET_PATH => $targetPath, UrlRewrite::REDIRECT_TYPE => $redirectType]);
 }
 /**
  * Create url rewrite object
  *
  * @param int $storeId
  * @param string|null $redirectType Null or one of OptionProvider const
  * @return UrlRewrite
  */
 protected function createUrlRewrite($storeId, $redirectType = null)
 {
     return $this->converter->convertArrayToObject([UrlRewrite::ENTITY_TYPE => self::ENTITY_TYPE, UrlRewrite::ENTITY_ID => $this->cmsPage->getId(), UrlRewrite::STORE_ID => $storeId, UrlRewrite::REQUEST_PATH => $this->cmsPage->getIdentifier(), UrlRewrite::TARGET_PATH => 'cms/page/view/page_id/' . $this->cmsPage->getId(), UrlRewrite::REDIRECT_TYPE => $redirectType]);
 }
Exemple #3
0
 /**
  * Create url rewrite object
  *
  * @param array $data
  * @return \Magento\UrlRedirect\Service\V1\Data\UrlRewrite
  */
 protected function createUrlRewrite($data)
 {
     return $this->converter->convertArrayToObject($data);
 }