protected function prepareTargetPath(array $category)
    {

        // query whether or not, the category is the root category
        if ($this->isRootCategory($category)) {
            $targetPath = sprintf('catalog/product/view/id/%d', $this->entityId);
        } else {
            $targetPath = sprintf('catalog/product/view/id/%d/category/%d', $this->entityId, $category[MemberNames::ENTITY_ID]);
        }

        // return the target path
        return $targetPath;
    }
protected function prepareTargetPath(array $category)
    {

        // query whether or not, the category is the root category
        if ($this->isRootCategory($category)) {
            $targetPath = sprintf('catalog/product/view/id/%d', $this->entityId);
        } else {
            $targetPath = sprintf('catalog/product/view/id/%d/category/%d', $this->entityId, $category[MemberNames::ENTITY_ID]);
        }

        // return the target path
        return $targetPath;
    }
protected function prepareTargetPath ( array $ category ) { // query whether or not, the category is the root category if ( $ this -> isRootCategory ( $ category ) ) { $ targetPath = sprintf ( 'catalog/product/view/id/%d' , $ this -> entityId ) ; } else { $ targetPath = sprintf ( 'catalog/product/view/id/%d/category/%d' , $ this -> entityId , $ category [ MemberNames :: ENTITY_ID ] ) ; } // return the target path return $ targetPath ; }
Prepare's the target path for a URL rewrite.

@param array $category The categroy with the URL path

@return string The target path
Prepare s the target path for a URL rewrite .