getTranslationKeys example

$this->View()->assign('sCategoryTree', $categoryTree);
    }

    private function getCategoryTree(): array
    {
        $shop = $this->container->get('shop');
        if (!$shop instanceof Shop) {
            throw new RuntimeException('Shop is not initialized correctly in DI container');
        }
        $categoryTree = $this->container->get('modules')->Categories()->sGetWholeCategoryTree(null, null, $shop->getId());

        $categoryTranslations = $this->fetchTranslations('category', $this->getTranslationKeys(
            $categoryTree,
            'id',
            'sub'
        ));

        return $this->translateCategoryTree($categoryTree$categoryTranslations);
    }

    private function translateCategoryTree(array $categoryTree, array $translations): array
    {
        foreach ($categoryTree as $key => $category) {
            
Home | Imprint | This part of the site doesn't use cookies.