• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

content/classes/class.ilStructureObjectGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 require_once("./content/classes/class.ilLMObjectGUI.php");
00025 
00038 class ilStructureObjectGUI extends ilLMObjectGUI
00039 {
00040         var $obj;       // structure object
00041         var $tree;
00042 
00047         function ilStructureObjectGUI(&$a_content_obj, &$a_tree)
00048         {
00049                 global $ilias, $tpl, $lng;
00050 
00051                 parent::ilLMObjectGUI($a_content_obj);
00052                 $this->tree =& $a_tree;
00053         }
00054 
00060         function setStructureObject(&$a_st_object)
00061         {
00062                 $this->obj =& $a_st_object;
00063                 $this->actions = $this->objDefinition->getActions("st");
00064         }
00065         
00066         
00070         function getType()
00071         {
00072                 return "st";
00073         }
00074 
00078         function &executeCommand()
00079         {
00080 //echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":";
00081                 $next_class = $this->ctrl->getNextClass($this);
00082                 $cmd = $this->ctrl->getCmd();
00083 
00084                 switch($next_class)
00085                 {
00086                         case "ilconditionhandlerinterface":
00087                                 include_once './classes/class.ilConditionHandlerInterface.php';
00088 
00089                                 $this->setTabs();
00090                                 $this->initConditionHandlerInterface();
00091                                 $this->ctrl->forwardCommand($this->condHI);
00092                                 break;
00093 
00094                         default:
00095                                 if($cmd == 'listConditions')
00096                                 {
00097                                         $this->setTabs();
00098                                         $this->initConditionHandlerInterface();
00099                                         $ret =& $this->condHI->executeCommand();
00100                                 }
00101                                 elseif(($cmd == "create") && ($_POST["new_type"] == "pg"))
00102                                 {
00103                                         $this->setTabs();
00104                                         $pg_gui =& new ilLMPageObjectGUI($this->content_object);
00105                                         $ret =& $pg_gui->executeCommand();
00106                                 }
00107                                 else
00108                                 {
00109                                         $ret =& $this->$cmd();
00110                                 }
00111                                 break;
00112                 }
00113         }
00114 
00115 
00119         function create()
00120         {
00121                 if ($_GET["obj_id"] != "")
00122                 {
00123                         $this->setTabs();
00124                 }
00125                 parent::create();
00126         }
00127 
00128 
00129         /*
00130         * display pages of structure object
00131         */
00132         function view()
00133         {
00134                 global $tree;
00135 
00136                 $this->setTabs();
00137 
00138                 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.structure_edit.html", true);
00139                 $num = 0;
00140 
00141                 $this->tpl->setCurrentBlock("form");
00142                 $this->ctrl->setParameter($this, "backcmd", "view");
00143                 $this->tpl->setVariable("FORMACTION",
00144                         $this->ctrl->getFormAction($this));
00145                 $this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_pages"));
00146                 $this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
00147 
00148                 $cnt = 0;
00149                 $childs = $this->tree->getChilds($this->obj->getId());
00150                 foreach ($childs as $child)
00151                 {
00152                         if($child["type"] != "pg")
00153                         {
00154                                 continue;
00155                         }
00156                         $this->tpl->setCurrentBlock("table_row");
00157                         // color changing
00158                         $css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
00159 
00160                         // checkbox
00161                         $this->tpl->setVariable("CHECKBOX_ID", $child["obj_id"]);
00162                         $this->tpl->setVariable("CSS_ROW", $css_row);
00163                         $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_le.gif"));
00164 
00165                         // link
00166                         $this->ctrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $child["obj_id"]);
00167                         $link = $this->ctrl->getLinkTargetByClass("ilLMPageObjectGUI", "view", "", true);
00168                         $this->tpl->setVariable("LINK_TARGET", $link);
00169 
00170                         // title
00171                         $this->tpl->setVariable("TEXT_CONTENT", $child["title"]);
00172 
00173                         $this->tpl->parseCurrentBlock();
00174                 }
00175                 if($cnt == 0)
00176                 {
00177                         $this->tpl->setCurrentBlock("notfound");
00178                         $this->tpl->setVariable("NUM_COLS", 3);
00179                         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
00180                         $this->tpl->parseCurrentBlock();
00181                 }
00182                 //else
00183                 //{
00184                         // SHOW VALID ACTIONS
00185                         $this->tpl->setVariable("NUM_COLS", 3);
00186                         //$this->setActions(array("confirmTermDeletion" => "delete", "addDefinition" => "cont_add_definition"));
00187                         $acts = array("delete" => "delete", "cutPage" => "cutPage",
00188                                 "copyPage" => "copyPage");
00189 //echo ":".$this->checkClipboardContentType().":<br>";
00190                         if(ilEditClipboard::getContentObjectType() == "pg")
00191                         {
00192                                 $acts["pastePage"] = "pastePage";
00193                         }
00194                         $this->setActions($acts);
00195                         $this->showActions();
00196                 //}
00197 
00198                 // SHOW POSSIBLE SUB OBJECTS
00199                 $this->tpl->setVariable("NUM_COLS", 3);
00200                 //$this->showPossibleSubObjects("st");
00201                 $subobj = array("pg");
00202                 $opts = ilUtil::formSelect(12,"new_type",$subobj);
00203                 //$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
00204                 $this->tpl->setCurrentBlock("add_object");
00205                 $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
00206                 //$this->tpl->setVariable("FORMACTION_OBJ_ADD", "adm_object.php?cmd=create&ref_id=".$_GET["ref_id"]);
00207                 $this->tpl->setVariable("BTN_NAME", "create");
00208                 $this->tpl->setVariable("TXT_ADD", $this->lng->txt("insert"));
00209                 $this->tpl->parseCurrentBlock();
00210 
00211 
00212                 $this->tpl->setCurrentBlock("form");
00213                 $this->tpl->parseCurrentBlock();
00214 
00215         }
00216 
00217 
00218         /*
00219         * display subchapters of structure object
00220         */
00221         function subchap()
00222         {
00223                 global $tree;
00224 
00225                 $this->setTabs();
00226 
00227                 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.structure_edit.html", true);
00228                 $num = 0;
00229 
00230                 $this->tpl->setCurrentBlock("form");
00231                 $this->ctrl->setParameter($this, "backcmd", "subchap");
00232                 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
00233                 $this->tpl->setVariable("HEADER_TEXT", $this->lng->txt("cont_subchapters"));
00234                 $this->tpl->setVariable("CHECKBOX_TOP", IL_FIRST_NODE);
00235 
00236                 $cnt = 0;
00237                 $childs = $this->tree->getChilds($this->obj->getId());
00238                 foreach ($childs as $child)
00239                 {
00240                         if($child["type"] != "st")
00241                         {
00242                                 continue;
00243                         }
00244                         $this->tpl->setCurrentBlock("table_row");
00245                         // color changing
00246                         $css_row = ilUtil::switchColor($cnt++,"tblrow1","tblrow2");
00247 
00248                         // checkbox
00249                         $this->tpl->setVariable("CHECKBOX_ID", $child["obj_id"]);
00250                         $this->tpl->setVariable("CSS_ROW", $css_row);
00251                         $this->tpl->setVariable("IMG_OBJ", ilUtil::getImagePath("icon_cat.gif"));
00252 
00253                         // type
00254                         $this->ctrl->setParameterByClass("ilStructureObjectGUI", "obj_id", $child["obj_id"]);
00255                         $link = $this->ctrl->getLinkTargetByClass("ilStructureObjectGUI", "view");
00256                         $this->tpl->setVariable("LINK_TARGET", $link);
00257 
00258                         // title
00259                         $this->tpl->setVariable("TEXT_CONTENT", $child["title"]);
00260 
00261                         $this->tpl->parseCurrentBlock();
00262                 }
00263                 if($cnt == 0)
00264                 {
00265                         $this->tpl->setCurrentBlock("notfound");
00266                         $this->tpl->setVariable("NUM_COLS", 2);
00267                         $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
00268                         $this->tpl->parseCurrentBlock();
00269                 }
00270                 //else
00271                 //{
00272                         // SHOW VALID ACTIONS
00273                         $this->tpl->setVariable("NUM_COLS", 3);
00274                         $acts = array("delete" => "delete", "move" => "moveChapter");
00275                         if(ilEditClipboard::getContentObjectType() == "st")
00276                         {
00277                                 if ($this->tree->isInTree(ilEditClipboard::getContentObjectId()))
00278                                 {
00279                                         $acts["pasteChapter"] =  "pasteChapter";
00280                                 }
00281                         }
00282                         /*if(!empty($_SESSION["ilEditClipboard"]))
00283                         {
00284                                 $acts["paste"] = "paste";
00285                         }*/
00286                         $this->setActions($acts);
00287                         $this->showActions();
00288                 //}
00289 
00290                 // SHOW POSSIBLE SUB OBJECTS
00291                 $this->tpl->setVariable("NUM_COLS", 3);
00292                 //$this->showPossibleSubObjects("st");
00293                 $subobj = array("st");
00294                 $opts = ilUtil::formSelect(12,"new_type",$subobj);
00295                 //$this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
00296                 $this->tpl->setCurrentBlock("add_object");
00297                 $this->tpl->setVariable("SELECT_OBJTYPE", $opts);
00298                 //$this->tpl->setVariable("FORMACTION_OBJ_ADD", "adm_object.php?cmd=create&ref_id=".$_GET["ref_id"]);
00299                 $this->tpl->setVariable("BTN_NAME", "create");
00300                 $this->tpl->setVariable("TXT_ADD", $this->lng->txt("insert"));
00301                 $this->tpl->parseCurrentBlock();
00302 
00303                 //$this->tpl->setVariable("NUM_COLS", 2);
00304                 //$this->showPossibleSubObjects("st");
00305 
00306                 $this->tpl->setCurrentBlock("form");
00307                 $this->tpl->parseCurrentBlock();
00308 
00309         }
00310 
00314         function add_cell($val, $link = "")
00315         {
00316                 if(!empty($link))
00317                 {
00318                         $this->tpl->setCurrentBlock("begin_link");
00319                         $this->tpl->setVariable("LINK_TARGET", $link);
00320                         $this->tpl->parseCurrentBlock();
00321                         $this->tpl->touchBlock("end_link");
00322                 }
00323 
00324                 $this->tpl->setCurrentBlock("text");
00325                 $this->tpl->setVariable("TEXT_CONTENT", $val);
00326                 $this->tpl->parseCurrentBlock();
00327                 $this->tpl->setCurrentBlock("table_cell");
00328                 $this->tpl->parseCurrentBlock();
00329         }
00330 
00331 
00335         function save()
00336         {
00337                 $meta_data =& new ilMetaData($_GET["new_type"], $this->content_object->getId());
00338 
00339                 $this->obj =& new ilStructureObject($this->content_object);
00340                 $this->obj->assignMetaData($meta_data);
00341                 $this->obj->setType("st");
00342                 $this->obj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
00343                 $this->obj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
00344                 $this->obj->setLMId($this->content_object->getId());
00345                 $this->obj->create();
00346 
00347                 $this->putInTree();
00348 
00349                 // check the tree
00350                 $this->checkTree();
00351 
00352                 if (!empty($_GET["obj_id"]))
00353                 {
00354                         $this->ctrl->redirect($this, "subchap");
00355                 }
00356 
00357         }
00358 
00362         function saveMeta()
00363         {
00364 //echo "lmobjectgui_Savemeta1<br>";
00365                 $meta_gui =& new ilMetaDataGUI();
00366                 $meta_gui->setObject($this->obj);
00367 //echo "lmobjectgui_Savemeta2<br>"; exit;
00368 //echo "title_value:".htmlentities($_POST["meta"]["Title"]["Value"]); exit;
00369                 $meta_gui->save($_POST["meta_section"]);
00370 //echo "lmobjectgui_Savemeta3<br>";
00371                 $this->ctrl->redirect($this, "view");
00372         }
00373 
00377         function putInTree()
00378         {
00379 //echo "st:putInTree";
00380                 // chapters should be behind pages in the tree
00381                 // so if target is first node, the target is substituted with
00382                 // the last child of type pg
00383                 if ($_GET["target"] == IL_FIRST_NODE)
00384                 {
00385                         $tree = new ilTree($this->content_object->getId());
00386                         $tree->setTableNames('lm_tree','lm_data');
00387                         $tree->setTreeTablePK("lm_id");
00388 
00389                         // determine parent node id
00390                         $parent_id = (!empty($_GET["obj_id"]))
00391                                 ? $_GET["obj_id"]
00392                                 : $tree->getRootId();
00393                         // determine last child of type pg
00394                         $childs =& $tree->getChildsByType($parent_id, "pg");
00395                         if (count($childs) != 0)
00396                         {
00397                                 $_GET["target"] = $childs[count($childs) - 1]["obj_id"];
00398                         }
00399                 }
00400                 if (empty($_GET["target"]))
00401                 {
00402                         $_GET["target"] = IL_LAST_NODE;
00403                 }
00404 
00405                 parent::putInTree();
00406         }
00407 
00411         function cutPage()
00412         {
00413 //echo "1";
00414 //unset($_SESSION["message"]);
00415 //echo $_SESSION["referer"];
00416                 if(!isset($_POST["id"]))
00417                 {
00418 //echo "2:".$_SESSION["message"].":";
00419                         $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
00420 
00421                 }
00422                 if(count($_POST["id"]) > 1)
00423                 {
00424                         $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
00425                 }
00426 
00427                 if(count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE)
00428                 {
00429                         $this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
00430                 }
00431 
00432                 // SAVE POST VALUES
00433                 ilEditClipboard::storeContentObject("pg",$_POST["id"][0]);
00434 
00435                 $tree = new ilTree($this->content_object->getId());
00436                 $tree->setTableNames('lm_tree','lm_data');
00437                 $tree->setTreeTablePK("lm_id");
00438 
00439                 // cut selected object
00440                 $cutted = 0;
00441                 foreach ($_POST["id"] as $id)
00442                 {
00443                         if ($id == -1)
00444                         {
00445                                 continue;
00446                         }
00447                         
00448                         $obj =& ilLMObjectFactory::getInstance($this->content_object, $id);
00449                         $obj->setLMId($this->content_object->getId());
00450                         $node_data = $tree->getNodeData($id);
00451                         //$obj->delete();
00452                         if($tree->isInTree($id))
00453                         {
00454                                 $parent_id = $tree->getParentId($id);
00455                                 $tree->deleteTree($node_data);
00456                                 
00457                                 // write history entry
00458                                 require_once("classes/class.ilHistory.php");
00459                                 ilHistory::_createEntry($id, "cut",
00460                                         array(ilLMObject::_lookupTitle($parent_id), $parent_id),
00461                                         $this->content_object->getType().":pg");
00462                                 ilHistory::_createEntry($parent_id, "cut_page",
00463                                         array(ilLMObject::_lookupTitle($id), $id),
00464                                         $this->content_object->getType().":st");
00465                         }
00466                         $cutted++;
00467                 }
00468 
00469                 // tree check
00470                 $this->checkTree();
00471 
00472                 if($cutted > 0)
00473                 {
00474                         sendInfo($this->lng->txt("msg_cut_clipboard"), true);
00475                 }
00476 
00477                 $this->ctrl->redirect($this, "view");
00478         }
00479 
00483         function copyPage()
00484         {
00485                 if(!isset($_POST["id"]))
00486                 {
00487                         $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
00488                 }
00489                 if(count($_POST["id"]) > 1)
00490                 {
00491                         $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"),$this->ilias->error_obj->MESSAGE);
00492                 }
00493 
00494                 if(count($_POST["id"]) == 1 && $_POST["id"][0] == IL_FIRST_NODE)
00495                 {
00496                         $this->ilias->raiseError($this->lng->txt("cont_select_item"), $this->ilias->error_obj->MESSAGE);
00497                 }
00498 
00499                 // SAVE POST VALUES
00500                 ilEditClipboard::storeContentObject("pg",$_POST["id"][0],"copy");
00501 
00502                 sendInfo($this->lng->txt("msg_copy_clipboard"), true);
00503 
00504                 $this->ctrl->redirect($this, "view");
00505         }
00506 
00510         function pastePage()
00511         {
00512                 if(ilEditClipboard::getContentObjectType() != "pg")
00513                 {
00514                         $this->ilias->raiseError($this->lng->txt("no_page_in_clipboard"),$this->ilias->error_obj->MESSAGE);
00515                 }
00516 
00517                 $tree = new ilTree($this->content_object->getId());
00518                 $tree->setTableNames('lm_tree','lm_data');
00519                 $tree->setTreeTablePK("lm_id");
00520 
00521                 // paste selected object
00522                 $id = ilEditClipboard::getContentObjectId();
00523 
00524                 // copy page, if action is copy
00525                 if (ilEditClipboard::getAction() == "copy")
00526                 {
00527                         // check wether page belongs to lm
00528                         if (ilLMObject::_lookupContObjID(ilEditClipboard::getContentObjectId())
00529                                 == $this->content_object->getID())
00530                         {
00531                                 $lm_page = new ilLMPageObject($this->content_object, $id);
00532                                 $new_page =& $lm_page->copy();
00533                                 $id = $new_page->getId();
00534                         }
00535                         else
00536                         {
00537                                 // get page from other content object into current content object
00538                                 $lm_id = ilLMObject::_lookupContObjID(ilEditClipboard::getContentObjectId());
00539                                 $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
00540                                 $lm_page = new ilLMPageObject($lm_obj, $id);
00541                                 $new_page =& $lm_page->copyToOtherContObject($this->content_object);
00542                                 $id = $new_page->getId();
00543                         }
00544                 }
00545                 
00546                 if (ilEditClipboard::getAction() == "cut")
00547                 {
00548                         // check wether page belongs not to lm
00549                         if (ilLMObject::_lookupContObjID(ilEditClipboard::getContentObjectId())
00550                                 != $this->content_object->getID())
00551                         {
00552                                 $lm_id = ilLMObject::_lookupContObjID(ilEditClipboard::getContentObjectId());
00553                                 $lm_obj =& $this->ilias->obj_factory->getInstanceByObjId($lm_id);
00554                                 $lm_page = new ilLMPageObject($lm_obj, $id);
00555                                 $lm_page->setLMId($this->content_object->getID());
00556                                 $lm_page->update();
00557                                 $page =& $lm_page->getPageObject();
00558                                 $page->buildDom();
00559                                 $page->setParentId($this->content_object->getID());
00560                                 $page->update();
00561                         }
00562                 }
00563 
00564                 if(!$tree->isInTree($id))
00565                 {
00566                         if(!isset($_POST["id"]))
00567                         {
00568                                 $target = IL_FIRST_NODE;
00569                         }
00570                         else
00571                         {
00572                                 $target = $_POST["id"][0];
00573                         }
00574                         $tree->insertNode($id, $this->obj->getId(), $target);
00575                         ilEditClipboard::clear();
00576                 }
00577                 
00578                 // write history comments
00579                 include_once("classes/class.ilHistory.php");
00580                 ilHistory::_createEntry($id, "paste",
00581                         array(ilLMObject::_lookupTitle($this->obj->getId()), $this->obj->getId()),
00582                         $this->content_object->getType().":pg");
00583                 ilHistory::_createEntry($parent_id, "paste_page",
00584                         array(ilLMObject::_lookupTitle($id), $id),
00585                         $this->content_object->getType().":st");
00586 
00587                 // check the tree
00588                 $this->checkTree();
00589 
00590                 $this->ctrl->redirect($this, "view");
00591         }
00592 
00593 
00597         function moveChapter()
00598         {
00599                 $cont_obj_gui =& new ilObjContentObjectGUI("",$this->content_object->getRefId(),
00600                         true, false);
00601                 $cont_obj_gui->moveChapter($this->obj->getId());
00602 
00603                 $this->ctrl->redirect($this, "subchap");
00604         }
00605 
00606 
00610         function pasteChapter()
00611         {
00612                 $id = ilEditClipboard::getContentObjectId();
00613                 if($id == $_POST["id"][0])
00614                 {
00615                         ilEditClipboard::clear();
00616                         $this->subchap();
00617                         return;
00618                 }
00619                 $cont_obj_gui =& new ilObjContentObjectGUI("",$this->content_object->getRefId(),
00620                         true, false);
00621                 $cont_obj_gui->pasteChapter($this->obj->getId());
00622 
00623                 $this->ctrl->redirect($this, "subchap");
00624         }
00625         
00626         
00627         //
00628         // Condition handling stuff
00629         //
00630         
00631         function initConditionHandlerInterface()
00632         {
00633                 include_once("classes/class.ilConditionHandlerInterface.php");
00634 
00635                 $this->condHI =& new ilConditionHandlerInterface($this);
00636                 $this->condHI->setBackButtons(array());
00637                 $this->condHI->setAutomaticValidation(false);
00638                 $this->condHI->setTargetType("st");
00639                 $this->condHI->setTargetId($this->obj->getId());
00640                 $this->condHI->setTargetTitle($this->obj->getTitle());
00641         }
00642         
00643 
00647         function cancel()
00648         {
00649                 sendInfo($this->lng->txt("msg_cancel"), true);
00650                 if ($_GET["obj_id"] != 0)
00651                 {
00652                         if ($_GET["new_type"] == "pg")
00653                         {
00654                                 $this->ctrl->redirect($this, "view");
00655                         }
00656                         else
00657                         {
00658                                 $this->ctrl->redirect($this, "subchap");
00659                         }
00660                 }
00661         }
00662 
00663 
00667         function setTabs()
00668         {
00669                 // catch feedback message
00670                 include_once("classes/class.ilTabsGUI.php");
00671                 $tabs_gui =& new ilTabsGUI();
00672                 //$this->getTabs($tabs_gui);
00673                 $tabs_gui->getTargetsByObjectType($this, "st");
00674                 $this->tpl->setVariable("TABS", $tabs_gui->getHTML());
00675                 $this->tpl->setVariable("HEADER",
00676                         $this->lng->txt($this->obj->getType()).": ".$this->obj->getTitle());
00677         }
00678 
00684         function getTabs(&$tabs_gui)
00685         {
00686                 // back to upper context
00687                 $tabs_gui->addTarget("edit", $this->ctrl->getLinkTarget($this, "view")
00688                         , "view", get_class($this));
00689 
00690                 $tabs_gui->addTarget("cont_preview", $this->ctrl->getLinkTarget($this, "preview")
00691                         , "preview", get_class($this));
00692 
00693                 $tabs_gui->addTarget("meta_data", $this->ctrl->getLinkTarget($this, "editMeta")
00694                         , "editMeta", get_class($this));
00695 
00696                 $tabs_gui->addTarget("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view")
00697                         , "view", "ilEditClipboardGUI");
00698 
00699         }
00700 
00701 }
00702 ?>

Generated on Fri Dec 13 2013 09:06:36 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1