src/Assembler/CategoryAssembler.php
public function getCategoriesWithResolvedPath()
    {

        // prepare the categories
        $categories = array();

        // load the categories from the database
        $availableCategories = $this->categoryRepository->findAll();

        // create the array with the resolved category path as keys
        foreach ($availableCategories as $category) {
            // expload the entity IDs from the category path
            $entityIds = explode('/', $category[MemberNames::PATH]);

            // cut-off the root category
            array_shift($entityIds);

            // continue with the next category if no entity IDs are available
            if (sizeof($entityIds) === 0) {
                continue;
            }

            // initialize the array for the path elements
            $path = array();
            foreach ($entityIds as $entityId) {
                $cat = $this->categoryVarcharRepository->findByEntityId($entityId);
                $path[] = $cat[MemberNames::VALUE];
            }

            // append the catogory with the string path as key
            $categories[implode('/', $path)] = $category;
        }

        // return array with the categories
        return $categories;
    }
public function getCategoriesWithResolvedPath()
    {

        // prepare the categories
        $categories = array();

        // load the categories from the database
        $availableCategories = $this->categoryRepository->findAll();

        // create the array with the resolved category path as keys
        foreach ($availableCategories as $category) {
            // expload the entity IDs from the category path
            $entityIds = explode('/', $category[MemberNames::PATH]);

            // cut-off the root category
            array_shift($entityIds);

            // continue with the next category if no entity IDs are available
            if (sizeof($entityIds) === 0) {
                continue;
            }

            // initialize the array for the path elements
            $path = array();
            foreach ($entityIds as $entityId) {
                $cat = $this->categoryVarcharRepository->findByEntityId($entityId);
                $path[] = $cat[MemberNames::VALUE];
            }

            // append the catogory with the string path as key
            $categories[implode('/', $path)] = $category;
        }

        // return array with the categories
        return $categories;
    }
Returns an array with the available categories and their
resolved path as keys.

@return array The array with the categories