/**
* Deletes $section from content repository.
*
* @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If the specified section is not found
* @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException If the current user user is not allowed to delete a section
* @throws \eZ\Publish\API\Repository\Exceptions\BadStateException if section can not be deleted
* because it is still assigned to some contents.
*
* @param \eZ\Publish\API\Repository\Values\Content\Section $section
*/
public function deleteSection(Section $section)
{
$response = $this->client->request('DELETE', $section->id, new Message(array('Accept' => $this->outputVisitor->getMediaType('Section'))));
if (!empty($response->body)) {
$this->inputDispatcher->parse($response);
}
}