/** * @param int $idChild * @param \Generated\Shared\Transfer\LocaleTransfer $localeTransfer * * @return string */ protected function generateChildUrl($idChild, LocaleTransfer $localeTransfer) { $parentList = $this->categoryTreeReader->getPathParents($idChild, $localeTransfer->getIdLocale()); $pathTokens = []; foreach ($parentList as $parent) { /** @var \Orm\Zed\Category\Persistence\SpyCategoryClosureTable $parent */ $pathTokens[] = $parent->toArray(); } return $this->generateUrlFromPathTokens($pathTokens); }
/** * @param int $idCategoryNode * @param \Generated\Shared\Transfer\LocaleTransfer $locale * * @return void */ protected function removeNodeUrl($idCategoryNode, LocaleTransfer $locale) { $nodeEntity = $this->categoryTreeReader->getNodeById($idCategoryNode); $nodeTransfer = (new NodeTransfer())->fromArray($nodeEntity->toArray()); $this->nodeUrlManager->removeUrl($nodeTransfer, $locale); }