Smile\ElasticsuiteCatalog\Model\Autocomplete\Category\ItemFactory::getCategoryUrl PHP Method

getCategoryUrl() private method

Done from the document source to prevent having to use addUrlRewrite to result on category collection.
private getCategoryUrl ( Magento\Catalog\Model\Category $category ) : string
$category Magento\Catalog\Model\Category The category.
return string
    private function getCategoryUrl($category)
    {
        $documentSource = $category->getDocumentSource();
        if ($documentSource && isset($documentSource['url_path'])) {
            $urlPath = is_array($documentSource['url_path']) ? current($documentSource['url_path']) : $documentSource['url_path'];
            $url = trim($this->urlBuilder->getUrl($urlPath), '/') . $this->categoryUrlSuffix;
            return $url;
        }
        return $category->getUrl();
    }