Pimcore\Model\Document\Tag\Pdf::checkValidity PHP Method

checkValidity() public method

public checkValidity ( ) : boolean
return boolean
    public function checkValidity()
    {
        $sane = true;
        if (!empty($this->id)) {
            $el = Asset::getById($this->id);
            if (!$el instanceof Asset) {
                $sane = false;
                Logger::notice("Detected insane relation, removing reference to non existent asset with id [" . $this->id . "]");
                $this->id = null;
            }
        }
        return $sane;
    }