eZ\Publish\Core\REST\Client\ObjectStateService::updateObjectStateGroup PHP 메소드

updateObjectStateGroup() 공개 메소드

Updates an object state group.
public updateObjectStateGroup ( eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup, eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct ) : eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroup eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
$objectStateGroupUpdateStruct eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroupUpdateStruct
리턴 eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup
    public function updateObjectStateGroup(ObjectStateGroup $objectStateGroup, ObjectStateGroupUpdateStruct $objectStateGroupUpdateStruct)
    {
        $inputMessage = $this->outputVisitor->visit($objectStateGroupUpdateStruct);
        $inputMessage->headers['Accept'] = $this->outputVisitor->getMediaType('ObjectStateGroup');
        $inputMessage->headers['X-HTTP-Method-Override'] = 'PATCH';
        // Should originally be PATCH, but PHP's shiny new internal web server
        // dies with it.
        $result = $this->client->request('POST', $objectStateGroup->id, $inputMessage);
        return $this->inputDispatcher->parse($result);
    }