eZ\Publish\Core\REST\Server\Controller\ObjectState::updateObjectState PHP Метод

updateObjectState() публичный Метод

Updates an object state.
public updateObjectState ( $objectStateGroupId, $objectStateId, Request $request ) : RestObjectState
$objectStateGroupId
$objectStateId
$request Symfony\Component\HttpFoundation\Request
Результат eZ\Publish\Core\REST\Common\Values\RestObjectState
    public function updateObjectState($objectStateGroupId, $objectStateId, Request $request)
    {
        $updateStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
        $objectState = $this->objectStateService->loadObjectState($objectStateId);
        try {
            $updatedObjectState = $this->objectStateService->updateObjectState($objectState, $updateStruct);
            return new RestObjectState($updatedObjectState, $objectStateGroupId);
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        }
    }