eZ\Publish\Core\REST\Server\Controller\ObjectState::createObjectStateGroup PHP Méthode

createObjectStateGroup() public méthode

Creates a new object state group.
public createObjectStateGroup ( Request $request ) : CreatedObjectStateGroup
$request Symfony\Component\HttpFoundation\Request
Résultat eZ\Publish\Core\REST\Server\Values\CreatedObjectStateGroup
    public function createObjectStateGroup(Request $request)
    {
        try {
            $createdStateGroup = $this->objectStateService->createObjectStateGroup($this->inputDispatcher->parse(new Message(array('Content-Type' => $request->headers->get('Content-Type')), $request->getContent())));
        } catch (InvalidArgumentException $e) {
            throw new ForbiddenException($e->getMessage());
        }
        return new Values\CreatedObjectStateGroup(array('objectStateGroup' => $createdStateGroup));
    }