public function getFromWebserviceImport($wsElement, $document = null, $params = [], $idMapper = null) { $data = $wsElement->value; if ($data->id) { $asset = Asset::getById($data->id); if (!$asset) { throw new \Exception("Referencing unknown asset with id [ " . $data->id . " ] in webservice import field [ " . $data->name . " ]"); } else { $this->id = $data->id; } } }