throw new ParameterMissingException('id'
);
} $variant =
$this->
getRepository()->
find($id);
if (!
$variant instanceof Detail
) { throw new NotFoundException(sprintf('Variant by id %d not found',
$id));
} $variant->
setArticle($article);
$data =
$this->
prepareData($data,
$article,
$variant);
$variant->
fromArray($data);
return $variant;
} /**
* Create function for the internal usage of the rest api.
* Used from the 'Article' resource. This function supports
* to pass an updated product entity which isn't updated in the database.
* Required for the 'Article' resource if the product data is already updated
* in the entity but not in the database.
*
* @throws ValidationException
*
* @return Detail
*/