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

getCategoryBreadcrumb() private method

Return a mini-breadcrumb for a category
private getCategoryBreadcrumb ( Magento\Catalog\Model\Category $category ) : array
$category Magento\Catalog\Model\Category The category
return array
    private function getCategoryBreadcrumb(\Magento\Catalog\Model\Category $category)
    {
        $path = $category->getPath();
        $rawPath = explode('/', $path);
        // First occurence is root category (1), second is root category of store.
        $rawPath = array_slice($rawPath, 2);
        // Last occurence is the category displayed.
        array_pop($rawPath);
        $breadcrumb = [];
        foreach ($rawPath as $categoryId) {
            $breadcrumb[] = html_entity_decode($this->getCategoryNameById($categoryId, $category->getStoreId()));
        }
        return $breadcrumb;
    }