/**
  * Delete tree
  */
 protected function dDeleteTree()
 {
     include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
     include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
     $GLOBALS['ilLog']->write('Deleting tree');
     $tree = new ilECSCmsTree((int) $_REQUEST['tid']);
     $tree->deleteTree($tree->getNodeData(ilECSCmsTree::lookupRootId((int) $_REQUEST['tid'])));
     // also delete import information
     include_once './Services/WebServices/ECS/classes/class.ilECSImport.php';
     ilECSImport::deleteRessources($this->getServer()->getServerId(), $this->getMid(), ilECSCmsData::lookupCmsIdsOfTree($this->getServer()->getServerId(), $this->getMid(), (int) $_REQUEST['tid']));
     $data = new ilECSCmsData();
     $data->setServerId($this->getServer()->getServerId());
     $data->setMid($this->getMid());
     $data->setTreeId((int) $_REQUEST['tid']);
     $data->deleteTree();
     include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
     ilECSNodeMappingAssignments::deleteMappings($this->getServer()->getServerId(), $this->getMid(), (int) $_REQUEST['tid']);
     ilUtil::sendSuccess($this->lng->txt('ecs_cms_tree_deleted'), true);
     $this->ctrl->redirect($this, 'dTrees');
 }
 /**
  * Handle delete
  * @param ilECSSetting $server
  * @param type $a_content_id
  */
 public function handleDelete(ilECSSetting $server, $a_content_id)
 {
     include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsData.php';
     $data = new ilECSCmsData();
     $data->setServerId($this->getServer()->getServerId());
     $data->setMid($this->mid);
     $data->setTreeId($a_content_id);
     $data->deleteTree();
     include_once './Services/WebServices/ECS/classes/Tree/class.ilECSCmsTree.php';
     $tree = new ilECSCmsTree($a_content_id);
     $tree->deleteTree($tree->getNodeData(ilECSCmsTree::lookupRootId($a_content_id)));
     include_once './Services/WebServices/ECS/classes/Mapping/class.ilECSNodeMappingAssignments.php';
     ilECSNodeMappingAssignments::deleteMappings($this->getServer()->getServerId(), $this->mid, $a_content_id);
     return true;
 }