/** * Retreive the object user side link * * @param bool $onlyUrl wether or not to return a simple URL or a full <a> link * @return string user side link to the object */ public function getItemLink($onlyUrl = false) { $controller = new icms_ipf_Controller($this->handler); return $controller->getItemLink($this, $onlyUrl); }
/** * Create the complete path of a category * * @todo this could be improved as it uses multiple queries * @param bool $withAllLink make all name clickable * @return string complete path (breadcrumb) */ public function getCategoryPath($withAllLink = true, $currentCategory = false) { $controller = new icms_ipf_Controller($this->handler); if (!$this->_categoryPath) { if ($withAllLink && !$currentCategory) { $ret = $controller->getItemLink($this); } else { $currentCategory = false; $ret = $this->getVar('name'); } $parentid = $this->getVar('parentid'); if ($parentid != 0) { $parentObj =& $this->handler->get($parentid); if ($parentObj->isNew()) { exit; } $parentid = $parentObj->getVar('parentid'); $ret = $parentObj->getCategoryPath($withAllLink, $currentCategory) . " > " . $ret; } $this->_categoryPath = $ret; } return $this->_categoryPath; }