Generate the menu URL with category

@return string
187198
protected function generateCategoryUrl()
    {
        /** @var $target PageModel */
        if ($this->jumpTo && ($target = $this->objModel->getRelated('jumpTo')) instanceof PageModel) {
            $page = $target;
        } else {
            $page = $GLOBALS['objPage'];
        }

        $manager = System::getContainer()->get('codefog_news_categories.manager');

        /** @var NewsCategoryModel $category */
        $category = NewsCategoryModel::findPublishedByIdOrAlias(Input::get($manager->getParameterName()));

        // Generate the category URL
        if ($category !== null) {
            $url = $manager->generateUrl($category, $page);
        } else {
            // Generate the regular URL
            $url = $page->getFrontendUrl();
        }

        return $url;
    }
942943
public function menuLinkParameters()
    {
        $previousAutoTranslate = $this->getAutoTranslate();
        $this->setAutoTranslate(false);

        $data = [
            'postID'        => $this->postID,
            'postSlug'      => $this->slug,
            'date'          => date('Y-m-d', strtotime($this->created_at)),
            'postTypeSlug'  => cleanPostTypeSlug($this->getTable())
        ];

        $this->setAutoTranslate($previousAutoTranslate);
        return $data;
    }
616406
public function generatePageNavigationUrl()
    {
        if ((\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive() && ($oRecomm = $this->getActiveRecommList()))) {
            return $oRecomm->getLink();
        }

        return \OxidEsales\Eshop\Application\Controller\FrontendController::generatePageNavigationUrl();
    }
595989
public function menu()
    {
        if (!empty($this->menu)) {
            return $this->menu;
        }

        $menuModel = config('admin.database.menu_model');

        return $this->menu = (new $menuModel())->toTree();
    }
737794
public static function GetActiveCategoryPath()
    {
        static $aCategoryList;
        if (!isset($aCategoryList)) {
            $aCategoryList = null;
            $oCurrentCategory = self::getShopService()->getActiveCategory();
            if (!is_null($oCurrentCategory)) {
                $aCategoryList = array();
                do {
                    $aCategoryList[$oCurrentCategory->id] = $oCurrentCategory;
                } while ($oCurrentCategory = &$oCurrentCategory->GetParent());
                $aCategoryList = array_reverse($aCategoryList, true);
            }
        }

        return $aCategoryList;
    }
33065
private function getCategory()
    {
        $category = $this->loadCategory();

        $this->addVirtualCategoryData($category)
            ->addSelectedProducts($category)
            ->setSortedProducts($category);

        return $category;
    }
752625
protected function getMenuList()
    {
        $links = $this->menu->getMenuList();
        $links->addParameterSources($this->request, $this->menu->getParameterSource());

        $source = new \Gems_Menu_ParameterSource(array(
            'gro_id_track' => $this->trackId,
            'gro_id_round' => $this->trackEngine->getPreviousRoundId($this->roundId),
            ));

        $links->append($this->menu->getCurrent()->toActionLink(true, \MUtil_Html::raw($this->_('&lt; Previous')), $source));
        $links->addCurrentParent($this->_('Cancel'));
        $links->addCurrentChildren();
        $links->addCurrentSiblings();

        $source->offsetSet('gro_id_round', $this->trackEngine->getNextRoundId($this->roundId));
        $links->append($this->menu->getCurrent()->toActionLink(true, \MUtil_Html::raw($this->_('Next &gt;')), $source));

        return $links;
    }
384418
protected function _getCategoryBreadCrumb()
    {
        $paths = [];

        $categoryTree = $this->getCatTreePath();

        if ($categoryTree) {
            foreach ($categoryTree as $category) {
                /** @var \OxidEsales\Eshop\Application\Model\Category $category */
                $categoryPath = [];

                $categoryPath['link'] = $category->getLink();
                $categoryPath['title'] = $category->oxcategories__oxtitle->value;

                $paths[] = $categoryPath;
            }
        }

        return $paths;
    }
33555
private function getCategoryChooserUrl()
    {
        $url = 'catalog_rule/promo_widget/chooser/attribute/' . $this->getAttribute();

        $chooserUrlParams = [];
        if ($this->getJsFormObject()) {
            $chooserUrlParams['form'] = $this->getJsFormObject();
        }

        $urlParams = $this->getUrlParams();
        if ($urlParams && is_array($urlParams) && isset($urlParams['category_id'])) {
            $chooserUrlParams['category_id'] = $urlParams['category_id'];
        }

        $url = $this->_backendData->getUrl($url, $chooserUrlParams);

        return $url;
    }
1097112
private function createCategory()
    {
        if($this->option('categories') || $this->option('categories_per_post_type') || $this->option('all')) {
            $this->comment('Creating dummy categories...');

            $output = (new \CategorySeeder())
                ->setCommand($this)
                ->run(
                    ($this->getDefaultOption('categories_per_post_type') ? $this->getDefaultOption('categories_per_post_type') : $this->getDefaultOption('categories')),
                    $this->getDefaultOption('post_type'),
                    ($this->getDefaultOption('categories_per_post_type') ? true : false)
                );

            $this->info($output);
        }
        return $this;
    }
65218
public function getChainedNameAttribute(): string
    {
        $categories = $this->breadcrumbLinks;
        $names = [];

        foreach ($categories as $url => $categoryName) {
            $names[] = $categoryName;
        }

        return implode(' -> ', $names);
    }
495057
public function getCanonicalUrl()
    {
        if (($category = $this->getActiveCategory())) {
            $utilsUrl = \OxidEsales\Eshop\Core\Registry::getUtilsUrl();
            if (\OxidEsales\Eshop\Core\Registry::getUtils()->seoIsActive()) {
                $url = $utilsUrl->prepareCanonicalUrl(
                    $category->getBaseSeoLink($category->getLanguage(), $this->getActPage())
                );
            } else {
                $url = $utilsUrl->prepareCanonicalUrl(
                    $category->getBaseStdLink($category->getLanguage(), $this->getActPage())
                );
            }

            return $url;
        }
    }
1350553
def category_links(categories)
      base_dir = @context.registers[:site].config['category_dir']
      categories = categories.sort!.map do |category|
        category_dir = GenerateCategories.category_dir(base_dir, category)
        # Make sure the category directory begins with a slash.
        category_dir = "/#{category_dir}" unless category_dir =~ /^\//
        "<a class='category' href='#{category_dir}/'>#{category}</a>"
      end

      case categories.length
      when 0
        ""
      when 1
        categories[0].to_s
      else
        categories.join(', ')
      end
    end
1127812
private function getCategory()
    {
        $storeId    = $this->getStoreId();
        $categoryId = $this->getCategoryId();
        $category   = null;

        if ($this->getCategoryId()) {
            $category = $this->categoryRepository->get($categoryId, $storeId);
        }

        return $category;
    }
1199880
public function generateURLSegment()
    {
        $filter = URLSegmentFilter::create();
        $name = $this->owner->FirstName . ' ' . $this->owner->Surname;
        $urlSegment = $filter->filter($name);

        if (!$urlSegment || $urlSegment == '-' || $urlSegment == '-1') {
            $urlSegment = 'profile-' . $this->owner->ID;
        }

        return $urlSegment;
    }
1028665
public function getCategory($category)
    {
        $ds = DIRECTORY_SEPARATOR;
        $categoryPath = str_replace('/', $ds, $category);

        $path = app_path().$ds.'lablog'.$ds.$categoryPath;

        if (!$this->exists($category)) {
            return (object) array();
        }

        $categoryExplode = explode('/', $category);
        $categoryName = end($categoryExplode);

        $linkPrefix = \Config::get('lablog::prefix') == '/' ? '' : \Config::get('lablog::prefix');

        $baseCategory = $category;
        $categoryLink = $linkPrefix.'/category/'.$category;
        $fullCategory = $category;

        $category = new Category;
        $category->name = $categoryName;
        $category->link = $baseCategory;
        $category->url = \URL::to($categoryLink);

        return $category;
    }
1288395
public function getActCategory()
    {
        // if active category is not set yet - trying to load it from request params
        // this may be usefull when category component was unable to load active category
        // and we still need some object to mount navigation info
        if ($this->_oClickCat === null) {
            $this->_oClickCat = false;
            $oCategory = oxNew(\OxidEsales\Eshop\Application\Model\Category::class);
            if ($oCategory->load($this->getCategoryId())) {
                $this->_oClickCat = $oCategory;
            }
        }

        return $this->_oClickCat;
    }