/**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     $this->tpl->setCurrentBlock("link");
     switch ($a_set["type"]) {
         case "fold":
             $this->tpl->setVariable("TXT_TITLE", $a_set["title"]);
             $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $a_set["obj_id"]);
             $this->tpl->setVariable("LINK_VIEW", $ilCtrl->getLinkTarget($this->parent_obj, $this->parent_cmd));
             $this->tpl->parseCurrentBlock();
             if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId()) && $this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT) {
                 $this->tpl->setCurrentBlock("edit");
                 $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
                 $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $a_set["obj_id"]);
                 $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTarget($this->parent_obj, "editFolder"));
                 $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $_GET[$this->folder_par]);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("IMG", ilUtil::img(ilUtil::getImagePath("icon_" . $a_set["type"] . ".svg")));
             $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder);
             break;
         case "pg":
             if ($this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT || $this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT_SINGLE) {
                 $this->tpl->setVariable("TXT_NO_LINK_TITLE", $a_set["title"]);
             } else {
                 $this->tpl->setVariable("ONCLICK", "il.MediaPool.preview('" . $a_set["child"] . "'); return false;");
                 $this->tpl->setVariable("TXT_TITLE", $a_set["title"]);
                 $ilCtrl->setParameterByClass("ilobjmediapoolgui", "mepitem_id", $a_set["child"]);
             }
             if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId()) && $this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT) {
                 $this->tpl->setCurrentBlock("edit");
                 $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
                 $ilCtrl->setParameterByClass("ilmediapoolpagegui", "mepitem_id", $a_set["child"]);
                 $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTargetByClass("ilmediapoolpagegui", "edit"));
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->setCurrentBlock("tbl_content");
             $this->tpl->setVariable("IMG", ilUtil::img(ilUtil::getImagePath("icon_pg.svg")));
             $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder);
             break;
         case "mob":
             $this->tpl->setVariable("ONCLICK", "il.MediaPool.preview('" . $a_set["child"] . "'); return false;");
             $this->tpl->setVariable("TXT_TITLE", $a_set["title"]);
             $ilCtrl->setParameterByClass("ilobjmediaobjectgui", "mepitem_id", $a_set["child"]);
             $ilCtrl->setParameter($this->parent_obj, "mob_id", $a_set["foreign_id"]);
             // edit link
             if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId()) && $this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT) {
                 $this->tpl->setCurrentBlock("edit");
                 $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
                 $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTargetByClass("ilobjmediaobjectgui", "edit"));
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->setCurrentBlock("link");
             $this->tpl->setCurrentBlock("tbl_content");
             // output thumbnail (or mob icon)
             if (ilObject::_lookupType($a_set["foreign_id"]) == "mob") {
                 $mob = new ilObjMediaObject($a_set["foreign_id"]);
                 $med = $mob->getMediaItem("Standard");
                 $target = "";
                 if ($med) {
                     $target = $med->getThumbnailTarget();
                 }
                 if ($target != "") {
                     $this->tpl->setVariable("IMG", ilUtil::img($target));
                 } else {
                     $this->tpl->setVariable("IMG", ilUtil::img(ilUtil::getImagePath("icon_" . $a_set["type"] . ".svg")));
                 }
                 if ($med && ilUtil::deducibleSize($med->getFormat()) && $med->getLocationType() == "Reference") {
                     $size = @getimagesize($med->getLocation());
                     if ($size[0] > 0 && $size[1] > 0) {
                         $wr = $size[0] / 80;
                         $hr = $size[1] / 80;
                         $r = max($wr, hr);
                         $w = (int) ($size[0] / $r);
                         $h = (int) ($size[1] / $r);
                         $this->tpl->setVariable("IMG", ilUtil::img($med->getLocation(), "", $w, $h));
                     }
                 }
                 // output media info
                 include_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php";
                 $this->tpl->setVariable("MEDIA_INFO", ilObjMediaObjectGUI::_getMediaInfoHTML($mob));
                 $ilCtrl->setParameter($this->parent_obj, $this->folder_par, $this->current_folder);
             }
             break;
     }
     if ($ilAccess->checkAccess("write", "", $this->media_pool->getRefId())) {
         if ($this->getMode() == ilMediaPoolTableGUI::IL_MEP_EDIT || $this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT && $a_set["type"] == "mob" || $this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT_CONTENT && $a_set["type"] == "pg") {
             $this->tpl->setCurrentBlock("chbox");
             $this->tpl->setVariable("CHECKBOX_ID", $a_set["child"]);
             $this->tpl->parseCurrentBlock();
             $this->tpl->setCurrentBlock("tbl_content");
         } else {
             if ($this->getMode() == ilMediaPoolTableGUI::IL_MEP_SELECT_SINGLE && $a_set["type"] == "mob") {
                 $this->tpl->setCurrentBlock("radio");
                 $this->tpl->setVariable("RADIO_ID", $a_set["child"]);
                 $this->tpl->parseCurrentBlock();
                 $this->tpl->setCurrentBlock("tbl_content");
             }
         }
     }
 }
 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl, $ilAccess;
     if ($a_set["type"] == "mob") {
         // output thumbnail
         $mob = new ilObjMediaObject($a_set["id"]);
         $med = $mob->getMediaItem("Standard");
         $target = $med->getThumbnailTarget();
         if ($target != "") {
             $this->tpl->setCurrentBlock("thumbnail");
             $this->tpl->setVariable("IMG_THUMB", $target);
             $this->tpl->parseCurrentBlock();
         }
     } else {
         if ($a_set["type"] == "incl") {
             $this->tpl->setCurrentBlock("thumbnail");
             $this->tpl->setVariable("IMG_THUMB", ilUtil::getImagePath("icon_pg.svg"));
             $this->tpl->parseCurrentBlock();
         }
     }
     // allow editing of media objects
     if ($this->parent_obj->mode != "getObject" && $a_set["type"] == "mob") {
         // output edit link
         $this->tpl->setCurrentBlock("edit");
         $ilCtrl->setParameter($this->parent_obj, "clip_item_id", $a_set["id"]);
         $ilCtrl->setParameterByClass("ilObjMediaObjectGUI", "clip_item_id", $a_set["id"]);
         $this->tpl->setVariable("EDIT_LINK", $ilCtrl->getLinkTargetByClass("ilObjMediaObjectGUI", "edit", array("ilEditClipboardGUI")));
         $this->tpl->setVariable("TEXT_OBJECT", $a_set["title"] . " [" . $a_set["id"] . "]");
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock("show");
         $this->tpl->setVariable("TEXT_OBJECT2", $a_set["title"] . " [" . $a_set["id"] . "]");
         $this->tpl->parseCurrentBlock();
     }
     include_once "./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php";
     if ($a_set["type"] == "mob") {
         $this->tpl->setVariable("MEDIA_INFO", ilObjMediaObjectGUI::_getMediaInfoHTML($mob));
     }
     $this->tpl->setVariable("CHECKBOX_ID", $a_set["type"] . ":" . $a_set["id"]);
 }