コード例 #1
0
 /**
  * Deletes a object state group including all states and links to content.
  *
  * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to delete an object state group
  *
  * @param \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup
  */
 public function deleteObjectStateGroup(ObjectStateGroup $objectStateGroup)
 {
     $returnValue = $this->service->deleteObjectStateGroup($objectStateGroup);
     $this->signalDispatcher->emit(new DeleteObjectStateGroupSignal(array('objectStateGroupId' => $objectStateGroup->id)));
     return $returnValue;
 }
コード例 #2
0
 /**
  * The given object state group including the object states is deleted.
  *
  * @param $objectStateGroupId
  *
  * @return \eZ\Publish\Core\REST\Server\Values\NoContent
  */
 public function deleteObjectStateGroup($objectStateGroupId)
 {
     $this->objectStateService->deleteObjectStateGroup($this->objectStateService->loadObjectStateGroup($objectStateGroupId));
     return new Values\NoContent();
 }