/**
* Delete a section
*
* Might throw an exception if the section is still associated with some
* content objects. Make sure that no content objects are associated with
* the section any more *before* calling this method.
*
* @param mixed $id
*/
public function delete($id)
{
$contentCount = $this->sectionGateway->countContentObjectsInSection($id);
if ($contentCount > 0) {
throw new RuntimeException("Section with ID '{$id}' still has content assigned.");
}
$this->sectionGateway->deleteSection($id);
}