public function unmarshal($value, $object = null, $params = []) { if (is_array($value)) { $type = $value["type"]; $id = $value["id"]; return Element\Service::getElementById($type, $id); } }