/** * Deletes a object state. The state of the content objects is reset to the * first object state in the group. * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to delete an object state * * @param \eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState */ public function deleteObjectState(ObjectState $objectState) { $returnValue = $this->service->deleteObjectState($objectState); $this->signalDispatcher->emit(new DeleteObjectStateSignal(array('objectStateId' => $objectState->id))); return $returnValue; }
/** * The given object state is deleted. * * @param $objectStateId * * @return \eZ\Publish\Core\REST\Server\Values\NoContent */ public function deleteObjectState($objectStateId) { $this->objectStateService->deleteObjectState($this->objectStateService->loadObjectState($objectStateId)); return new Values\NoContent(); }