public function setDataFromResource($data) { $data = \Pimcore\Tool\Serialize::unserialize($data); $this->id = $data["id"]; $this->type = $data["type"]; $this->subtype = $data["subtype"]; $this->setElement(); return $this; }