57 $useDefaultAttribute = !
$category->isObjectNew() && !empty(
$category->getData(
'use_default')[
'url_key']);
58 if (
$category->getUrlKey() !==
false && !$useDefaultAttribute) {
59 $resultUrlKey = $this->categoryUrlPathGenerator->getUrlKey(
$category);
60 if (empty($resultUrlKey)) {
61 throw new \Magento\Framework\Exception\LocalizedException(
__(
'Invalid URL key'));
64 ->setUrlPath($this->categoryUrlPathGenerator->getUrlPath(
$category));
67 if (
$category->dataHasChangedFor(
'url_path')) {
85 if ($this->storeViewService->doesEntityHaveOverriddenUrlPathForStore(
97 $child->setStoreId(
$category->getStoreId());
__construct(CategoryUrlPathGenerator $categoryUrlPathGenerator, ChildrenCategoriesProvider $childrenCategoriesProvider, StoreViewService $storeViewService)
updateUrlPathForChildren(Category $category)
$categoryUrlPathGenerator
$childrenCategoriesProvider
updateUrlPathForCategory(Category $category)
execute(Observer $observer)