public updateContentTypeDraft ( $contentTypeId, |
||
$contentTypeId | ||
$request | ||
Résultat |
public function updateContentTypeDraft($contentTypeId, Request $request)
{
$contentTypeDraft = $this->contentTypeService->loadContentTypeDraft($contentTypeId);
$contentTypeUpdateStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
try {
$this->contentTypeService->updateContentTypeDraft($contentTypeDraft, $contentTypeUpdateStruct);
} catch (InvalidArgumentException $e) {
throw new ForbiddenException($e->getMessage());
}
return new Values\RestContentType($this->contentTypeService->loadContentTypeDraft($contentTypeDraft->id));
}