/**
  * get html 
  * @return
  */
 public function getHTML()
 {
     global $lng;
     $lng->loadLanguageModule('content');
     foreach ($this->getSubItemIds(true) as $sub_item) {
         if (is_object($this->getHighlighter()) and strlen($this->getHighlighter()->getContent($this->getObjId(), $sub_item))) {
             $this->tpl->setCurrentBlock('sea_fragment');
             $this->tpl->setVariable('TXT_FRAGMENT', $this->getHighlighter()->getContent($this->getObjId(), $sub_item));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock('subitem');
         $this->tpl->setVariable('SEPERATOR', ':');
         include_once './Modules/MediaPool/classes/class.ilMediaPoolItem.php';
         switch (ilMediaPoolItem::lookupType($sub_item)) {
             case 'fold':
                 $this->tpl->setVariable('LINK', ilLink::_getLink($this->getRefId(), 'mep', array(), '_' . $sub_item));
                 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
                 break;
             case 'mob':
                 $this->tpl->setVariable('LINK', $this->getItemListGUI()->getCommandLink('allMedia') . '&force_filter=' . $sub_item);
                 $this->tpl->setVariable('TARGET', $this->getItemListGUI()->getCommandFrame(''));
                 break;
             default:
         }
         $this->tpl->setVariable('SUBITEM_TYPE', $lng->txt('obj_' . ilMediaPoolItem::lookupType($sub_item)));
         $this->tpl->setVariable('TITLE', ilMediaPoolItem::lookupTitle($sub_item));
         $this->tpl->parseCurrentBlock();
     }
     $this->showDetailsLink();
     return $this->tpl->get();
 }
 /**
  * Delete a child of media tree 
  * @param	int		mep_item id
  */
 function deleteChild($obj_id)
 {
     $fid = ilMediaPoolItem::lookupForeignId($obj_id);
     $type = ilMediaPoolItem::lookupType($obj_id);
     $title = ilMediaPoolItem::lookupTitle($obj_id);
     $node_data = $this->tree->getNodeData($obj_id);
     $subtree = $this->tree->getSubtree($node_data);
     // delete tree
     if ($this->tree->isInTree($obj_id)) {
         $this->tree->deleteTree($node_data);
     }
     // delete objects
     foreach ($subtree as $node) {
         $fid = ilMediaPoolItem::lookupForeignId($node["child"]);
         if ($node["type"] == "mob") {
             if (ilObject::_lookupType($fid) == "mob") {
                 $obj =& new ilObjMediaObject($fid);
                 $obj->delete();
             }
         }
         if ($node["type"] == "fold") {
             if ($fid > 0 && ilObject::_lookupType($fid) == "fold") {
                 $obj = new ilObjFolder($fid, false);
                 $obj->delete();
             }
         }
         if ($node["type"] == "pg") {
             include_once "./Modules/MediaPool/classes/class.ilMediaPoolPage.php";
             if (ilMediaPoolPage::_exists($node["child"])) {
                 $pg = new ilMediaPoolPage($node["child"]);
                 $pg->delete();
             }
         }
         include_once "./Modules/MediaPool/classes/class.ilMediaPoolItem.php";
         $item = new ilMediaPoolItem($node["child"]);
         $item->delete();
     }
 }
 /**
  * copy media objects to clipboard
  */
 function copyToClipboard()
 {
     global $ilUser, $ilAccess;
     $this->checkPermission("write");
     if (!isset($_POST["id"])) {
         ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
         $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
     }
     foreach ($_POST["id"] as $obj_id) {
         $type = ilMediaPoolItem::lookupType($obj_id);
         if ($type == "fold") {
             ilUtil::sendFailure($this->lng->txt("cont_cant_copy_folders"), true);
             $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
         }
     }
     foreach ($_POST["id"] as $obj_id) {
         $fid = ilMediaPoolItem::lookupForeignId($obj_id);
         $type = ilMediaPoolItem::lookupType($obj_id);
         if ($type == "mob") {
             $ilUser->addObjectToClipboard($fid, "mob", "");
         }
         if ($type == "pg") {
             $ilUser->addObjectToClipboard($obj_id, "incl", "");
         }
     }
     ilUtil::sendSuccess($this->lng->txt("copied_to_clipboard"), true);
     $this->ctrl->redirect($this, $_GET["mep_mode"] ? $_GET["mep_mode"] : "listMedia");
 }