Pimcore\Model\Document\Link::getLink PHP Method

    public function getLink()
    {
        $path = $this->getHref();
        if (strlen($this->getParameters()) > 0) {
            $path .= "?" . str_replace("?", "", $this->getParameters());
        }
        if (strlen($this->getAnchor()) > 0) {
            $path .= "#" . str_replace("#", "", $this->getAnchor());
        }
        return $path;
    }