PugMoRe_Mageploy_Helper_Data::getCategoryPathFromUuid PHP Method

getCategoryPathFromUuid() public method

public getCategoryPathFromUuid ( $uuid, $separator )
    public function getCategoryPathFromUuid($uuid, $separator)
    {
        $pathParts = array();
        $categoryPathParts = explode($separator, $uuid);
        foreach ($categoryPathParts as $i => $catUuid) {
            if ($i == 0) {
                $pathParts[] = Mage_Catalog_Model_Category::TREE_ROOT_ID;
            } else {
                $category = $this->_getCategoryFromParentIdAndName($pathParts[$i - 1], $catUuid);
                $pathParts[] = $category->getId();
            }
        }
        return implode('/', $pathParts);
    }