Pimcore\Model\Document\Tag\Href::setDataFromResource PHP Method

setDataFromResource() public method

See also: Document\Tag\TagInterface::setDataFromResource
public setDataFromResource ( mixed $data ) : void
$data mixed
return void
    public function setDataFromResource($data)
    {
        if (!empty($data)) {
            $data = \Pimcore\Tool\Serialize::unserialize($data);
        }
        $this->id = $data["id"];
        $this->type = $data["type"];
        $this->subtype = $data["subtype"];
        $this->setElement();
        return $this;
    }