ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilMediaPoolPageGUI.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 include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
5 include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
6 include_once("./Modules/MediaPool/classes/class.ilMediaPoolItem.php");
7 
20 {
24  function __construct($a_id = 0, $a_old_nr = 0)
25  {
26  global $tpl;
27 
28  parent::__construct("mep", $a_id, $a_old_nr);
29 
30  // content style
31  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
32  $tpl->setCurrentBlock("ContentStyle");
33  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
35  $tpl->parseCurrentBlock();
36 
37  $tpl->setCurrentBlock("SyntaxStyle");
38  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
40  $tpl->parseCurrentBlock();
41 
42  $this->setEnabledMaps(false);
43  $this->setPreventHTMLUnmasking(false);
44  $this->setEnabledInternalLinks(false);
45  $this->setEnabledWikiLinks(false);
46 
47  }
48 
49  function initPageObject($a_parent_type, $a_id, $a_old_nr)
50  {
51  $page = new ilMediaPoolPage($a_id, $a_old_nr);
52  $this->setPageObject($page);
53  }
54 
58  function &executeCommand()
59  {
60  global $ilCtrl, $ilTabs;
61 
62  $next_class = $this->ctrl->getNextClass($this);
63  $cmd = $this->ctrl->getCmd();
64 
65  switch($next_class)
66  {
67  case "ilpageobjectgui":
68  $page_gui = new ilPageObjectGUI("wpg",
69  $this->getPageObject()->getId(), $this->getPageObject()->old_nr);
70  return $ilCtrl->forwardCommand($page_gui);
71 
72  default:
73  return parent::executeCommand();
74  }
75  }
76 
82  function setMediaPoolPage($a_media_pool_page)
83  {
84  $this->setPageObject($a_media_pool_page);
85  }
86 
92  function getMediaPoolPage()
93  {
94  return $this->getPageObject();
95  }
96 
100  static function getGUIForTitle($a_media_pool_id, $a_title, $a_old_nr = 0)
101  {
102  global $ilDB;
103 
104  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
105  $id = ilMediaPoolPage::getPageIdForTitle($a_media_pool_id, $a_title);
106  $page_gui = new ilMediaPoolPageGUI($id, $a_old_nr);
107 
108  return $page_gui;
109  }
110 
114  function preview()
115  {
116  global $ilCtrl, $ilAccess, $lng;
117 
118  return parent::preview();
119  }
120 
124  function showPage($a_no_title = false)
125  {
126  global $tpl, $ilCtrl;
127 
128  $this->setTemplateOutput(false);
129  if (!$a_no_title)
130  {
132  }
133  $output = parent::showPage();
134 
135  return $output;
136  }
137 
138  function getTabs($a_activate = "")
139  {
140  global $ilTabs, $ilCtrl;
141 
142  parent::getTabs($a_activate);
143  }
144 
151  function getRawContent()
152  {
153  $this->setRawPageContent(true);
154  return $this->showPage(true);
155  }
156 
157 }
158 ?>