public function getHref()
{
$path = "";
if ($this->getLinktype() == "internal") {
if ($this->getObject() instanceof Document || $this->getObject() instanceof Asset) {
$path = $this->getObject()->getFullPath();
}
} else {
$path = $this->getDirect();
}
if (strlen($this->getParameters()) > 0) {
$path .= "?" . str_replace("?", "", $this->getParameters());
}
if (strlen($this->getAnchor()) > 0) {
$path .= "#" . str_replace("#", "", $this->getAnchor());
}
$this->href = $path;
return $path;
}