Example #1
0
 /**
  * Generate category url key path
  *
  * @param \Magento\Catalog\Model\Category $category
  * @return string
  */
 public function generateCategoryUrlKeyPath($category)
 {
     $parentPath = $this->categoryHelper->getCategoryUrlPath('', true, $category->getStoreId());
     $urlKey = $category->getUrlKey() == '' ? $category->formatUrlKey($category->getName()) : $category->formatUrlKey($category->getUrlKey());
     return $parentPath . $urlKey;
 }
 /**
  * Generate category url key
  *
  * @param \Magento\Catalog\Model\Category $category
  * @return string
  */
 public function generateUrlKey($category)
 {
     $urlKey = $category->getUrlKey();
     return $category->formatUrlKey($urlKey === '' || $urlKey === null ? $category->getName() : $urlKey);
 }
 /**
  * {@inheritdoc}
  */
 public function getUrlKey()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getUrlKey');
     if (!$pluginInfo) {
         return parent::getUrlKey();
     } else {
         return $this->___callPlugins('getUrlKey', func_get_args(), $pluginInfo);
     }
 }