Pimcore\Model\Object\Data\Link::getHtml PHP Метод

getHtml() публичный Метод

public getHtml ( )
    public function getHtml()
    {
        $attributes = ["rel", "tabindex", "accesskey", "title", "target", "class"];
        $attribs = [];
        foreach ($attributes as $a) {
            if ($this->{$a}) {
                $attribs[] = $a . '="' . $this->{$a} . '"';
            }
        }
        if ($this->getAttributes()) {
            $attribs[] = $this->getAttributes();
        }
        if (empty($this->text)) {
            return "";
        }
        return '<a href="' . $this->getHref() . '" ' . implode(" ", $attribs) . '>' . htmlspecialchars($this->getText()) . '</a>';
    }