ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilMediaPoolExplorer.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once("classes/class.ilExplorer.php");
5 
6 /*
7 * Explorer for Media Pools
8 *
9 * @author Alex Killing <alex.killing@gmx.de>
10 * @version $Id: class.ilMediaPoolExplorer.php 23258 2010-03-18 13:45:26Z akill $
11 *
12 * @ingroup ModulesMediaPool
13 */
15 {
16 
22  var $root_id;
24  var $output;
25 
32  function ilMediaPoolExplorer($a_target, &$a_media_pool)
33  {
34  parent::ilExplorer($a_target);
35 
36  $this->tree =& $a_media_pool->getTree();
37  $this->root_id = $this->tree->readRootId();
38  $this->media_pool =& $a_media_pool;
39  $this->order_column = "title";
40  $this->setSessionExpandVariable("mepexpand");
41  $this->checkPermissions(false);
42  $this->setPostSort(false);
43  }
44 
45 
53  function formatHeader(&$tpl, $a_obj_id,$a_option)
54  {
55  global $lng, $ilias;
56 
57  //$tpl = new ilTemplate("tpl.tree.html", true, true);
58 
59  $tpl->setCurrentBlock("icon");
60  $tpl->setVariable("ICON_IMAGE" , ilUtil::getImagePath("icon_mep_s.gif"));
61  $tpl->setVariable("TXT_ALT_IMG",
62  ilUtil::shortenText($this->media_pool->getTitle(), $this->textwidth, true));
63  $tpl->parseCurrentBlock();
64 
65  $tpl->setCurrentBlock("link");
66  $tpl->setVariable("TITLE", ilUtil::shortenText($this->media_pool->getTitle(), $this->textwidth, true));
67  $tpl->setVariable("LINK_TARGET", $this->target);
68  $tpl->setVariable("TARGET", " target=\"".$this->frame_target."\"");
69  $tpl->parseCurrentBlock();
70 
71  $tpl->setCurrentBlock("element");
72  $tpl->parseCurrentBlock();
73 
74  //$this->output[] = $tpl->get();
75  }
76 
77 }
78 ?>