| @@ 208-225 (lines=18) @@ | ||
| 205 | * |
|
| 206 | * @param \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $objectStateGroup |
|
| 207 | */ |
|
| 208 | public function deleteObjectStateGroup(ObjectStateGroup $objectStateGroup) |
|
| 209 | { |
|
| 210 | $response = $this->client->request( |
|
| 211 | 'DELETE', |
|
| 212 | $objectStateGroup->id, |
|
| 213 | new Message( |
|
| 214 | // @todo: What media-type should we set here? Actually, it should be |
|
| 215 | // all expected exceptions + none? Or is "ObjectStateGroup" correct, |
|
| 216 | // since this is what is to be expected by the resource |
|
| 217 | // identified by the URL? |
|
| 218 | array('Accept' => $this->outputVisitor->getMediaType('ObjectStateGroup')) |
|
| 219 | ) |
|
| 220 | ); |
|
| 221 | ||
| 222 | if (!empty($response->body)) { |
|
| 223 | $this->inputDispatcher->parse($response); |
|
| 224 | } |
|
| 225 | } |
|
| 226 | ||
| 227 | /** |
|
| 228 | * Creates a new object state in the given group. |
|
| @@ 326-343 (lines=18) @@ | ||
| 323 | * |
|
| 324 | * @param \eZ\Publish\API\Repository\Values\ObjectState\ObjectState $objectState |
|
| 325 | */ |
|
| 326 | public function deleteObjectState(ObjectState $objectState) |
|
| 327 | { |
|
| 328 | $response = $this->client->request( |
|
| 329 | 'DELETE', |
|
| 330 | $objectState->id, |
|
| 331 | new Message( |
|
| 332 | // @todo: What media-type should we set here? Actually, it should be |
|
| 333 | // all expected exceptions + none? Or is "ObjectState" correct, |
|
| 334 | // since this is what is to be expected by the resource |
|
| 335 | // identified by the URL? |
|
| 336 | array('Accept' => $this->outputVisitor->getMediaType('ObjectState')) |
|
| 337 | ) |
|
| 338 | ); |
|
| 339 | ||
| 340 | if (!empty($response->body)) { |
|
| 341 | $this->inputDispatcher->parse($response); |
|
| 342 | } |
|
| 343 | } |
|
| 344 | ||
| 345 | /** |
|
| 346 | * Sets the object-state of a state group to $state for the given content. |
|
| @@ 390-407 (lines=18) @@ | ||
| 387 | * |
|
| 388 | * @param \eZ\Publish\API\Repository\Values\User\RoleDraft $roleDraft |
|
| 389 | */ |
|
| 390 | public function deleteRoleDraft(APIRoleDraft $roleDraft) |
|
| 391 | { |
|
| 392 | $response = $this->client->request( |
|
| 393 | 'DELETE', |
|
| 394 | $roleDraft->id, |
|
| 395 | new Message( |
|
| 396 | // @todo: What media-type should we set here? Actually, it should be |
|
| 397 | // all expected exceptions + none? Or is "RoleDraft" correct, |
|
| 398 | // since this is what is to be expected by the resource |
|
| 399 | // identified by the URL? |
|
| 400 | array('Accept' => $this->outputVisitor->getMediaType('RoleDraft')) |
|
| 401 | ) |
|
| 402 | ); |
|
| 403 | ||
| 404 | if (!empty($response->body)) { |
|
| 405 | $this->inputDispatcher->parse($response); |
|
| 406 | } |
|
| 407 | } |
|
| 408 | ||
| 409 | /** |
|
| 410 | * Publishes a given Role draft. |
|
| @@ 749-766 (lines=18) @@ | ||
| 746 | * |
|
| 747 | * @param \eZ\Publish\API\Repository\Values\User\Role $role |
|
| 748 | */ |
|
| 749 | public function deleteRole(APIRole $role) |
|
| 750 | { |
|
| 751 | $response = $this->client->request( |
|
| 752 | 'DELETE', |
|
| 753 | $role->id, |
|
| 754 | new Message( |
|
| 755 | // @todo: What media-type should we set here? Actually, it should be |
|
| 756 | // all expected exceptions + none? Or is "Role" correct, |
|
| 757 | // since this is what is to be expected by the resource |
|
| 758 | // identified by the URL? |
|
| 759 | array('Accept' => $this->outputVisitor->getMediaType('Role')) |
|
| 760 | ) |
|
| 761 | ); |
|
| 762 | ||
| 763 | if (!empty($response->body)) { |
|
| 764 | $this->inputDispatcher->parse($response); |
|
| 765 | } |
|
| 766 | } |
|
| 767 | ||
| 768 | /** |
|
| 769 | * Loads all policies from roles which are assigned to a user or to user groups to which the user belongs. |
|
| @@ 287-304 (lines=18) @@ | ||
| 284 | * |
|
| 285 | * @param \eZ\Publish\API\Repository\Values\Content\Section $section |
|
| 286 | */ |
|
| 287 | public function deleteSection(Section $section) |
|
| 288 | { |
|
| 289 | $response = $this->client->request( |
|
| 290 | 'DELETE', |
|
| 291 | $section->id, |
|
| 292 | new Message( |
|
| 293 | // @todo: What media-type should we set here? Actually, it should be |
|
| 294 | // all expected exceptions + none? Or is "Section" correct, |
|
| 295 | // since this is what is to be expected by the resource |
|
| 296 | // identified by the URL? |
|
| 297 | array('Accept' => $this->outputVisitor->getMediaType('Section')) |
|
| 298 | ) |
|
| 299 | ); |
|
| 300 | ||
| 301 | if (!empty($response->body)) { |
|
| 302 | $this->inputDispatcher->parse($response); |
|
| 303 | } |
|
| 304 | } |
|
| 305 | ||
| 306 | /** |
|
| 307 | * Instantiates a new SectionCreateStruct. |
|
| @@ 152-169 (lines=18) @@ | ||
| 149 | * |
|
| 150 | * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to empty the trash |
|
| 151 | */ |
|
| 152 | public function emptyTrash() |
|
| 153 | { |
|
| 154 | $response = $this->client->request( |
|
| 155 | 'DELETE', |
|
| 156 | $this->requestParser->generate('trashItems'), |
|
| 157 | new Message( |
|
| 158 | // @todo: What media-type should we set here? Actually, it should be |
|
| 159 | // all expected exceptions + none? Or is "Location" correct, |
|
| 160 | // since this is what is to be expected by the resource |
|
| 161 | // identified by the URL? |
|
| 162 | array('Accept' => $this->outputVisitor->getMediaType('Location')) |
|
| 163 | ) |
|
| 164 | ); |
|
| 165 | ||
| 166 | if (!empty($response->body)) { |
|
| 167 | $this->inputDispatcher->parse($response); |
|
| 168 | } |
|
| 169 | } |
|
| 170 | ||
| 171 | /** |
|
| 172 | * Deletes a trash item. |
|
| @@ 180-197 (lines=18) @@ | ||
| 177 | * |
|
| 178 | * @param \eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem |
|
| 179 | */ |
|
| 180 | public function deleteTrashItem(APITrashItem $trashItem) |
|
| 181 | { |
|
| 182 | $response = $this->client->request( |
|
| 183 | 'DELETE', |
|
| 184 | $trashItem->id, |
|
| 185 | new Message( |
|
| 186 | // @todo: What media-type should we set here? Actually, it should be |
|
| 187 | // all expected exceptions + none? Or is "Location" correct, |
|
| 188 | // since this is what is to be expected by the resource |
|
| 189 | // identified by the URL? |
|
| 190 | array('Accept' => $this->outputVisitor->getMediaType('Location')) |
|
| 191 | ) |
|
| 192 | ); |
|
| 193 | ||
| 194 | if (!empty($response->body)) { |
|
| 195 | $this->inputDispatcher->parse($response); |
|
| 196 | } |
|
| 197 | } |
|
| 198 | ||
| 199 | /** |
|
| 200 | * Returns a collection of Trashed locations contained in the trash. |
|