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

setObjectFromId() public method

public setObjectFromId ( ) : Asset | Document
return Pimcore\Model\Asset | Pimcore\Model\Document
    public function setObjectFromId()
    {
        if ($this->internal) {
            if ($this->internalType == "document") {
                $this->object = Document::getById($this->internal);
            } elseif ($this->internalType == "asset") {
                $this->object = Asset::getById($this->internal);
            }
        }
        return $this->object;
    }