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; }