eZ\Publish\Core\REST\Server\Controller\ObjectState::updateObjectStateGroup PHP Method

updateObjectStateGroup() public method

Updates an object state group.
public updateObjectStateGroup ( $objectStateGroupId, Request $request ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroupId
$request Symfony\Component\HttpFoundation\Request
return eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
    public function updateObjectStateGroup($objectStateGroupId, Request $request)
    {
        $updateStruct = $this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent()));
        $objectStateGroup = $this->objectStateService->loadObjectStateGroup($objectStateGroupId);
        try {
            $updatedStateGroup = $this->objectStateService->updateObjectStateGroup($objectStateGroup, $updateStruct);
            return $updatedStateGroup;
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        }
    }