/**
  * Delete page with all content
  */
 function handleDelete($id)
 {
     $doc = new Model\Document($this->database);
     $doc->delete($id);
     Model\IO::removeDirectory(APP_DIR . '/media/' . $id);
     $this->redirect(":Admin:Events:default", array("id" => null));
 }
 /**
  * Delete page
  */
 function handleDeletePage($id)
 {
     $page = new Model\Page($this->database);
     $pages = $page->getChildren($id);
     $pages[] = $id;
     foreach ($pages as $item) {
         echo 1;
         $doc = new Model\Document($this->database);
         $doc->delete($item);
         Model\IO::removeDirectory(APP_DIR . '/media/' . $item);
     }
     $this->redirect(this, array("id" => null, "type" => $this->getParameter("type")));
 }