ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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, $a_prevent_get_id = false, $a_lang = "")
25  {
26  global $tpl;
27 
28  parent::__construct("mep", $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
29 
30  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
32 
33  $this->setEditPreview(true);
34  }
35 
39  function executeCommand()
40  {
41  global $ilCtrl, $ilTabs;
42 
43  $next_class = $this->ctrl->getNextClass($this);
44  $cmd = $this->ctrl->getCmd();
45 
46  switch($next_class)
47  {
48  default:
49  return parent::executeCommand();
50  }
51  }
52 
58  function setMediaPoolPage($a_media_pool_page)
59  {
60  $this->setPageObject($a_media_pool_page);
61  }
62 
68  function getMediaPoolPage()
69  {
70  return $this->getPageObject();
71  }
72 
76  static function getGUIForTitle($a_media_pool_id, $a_title, $a_old_nr = 0)
77  {
78  global $ilDB;
79 
80  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
81  $id = ilMediaPoolPage::getPageIdForTitle($a_media_pool_id, $a_title);
82  $page_gui = new ilMediaPoolPageGUI($id, $a_old_nr);
83 
84  return $page_gui;
85  }
86 
90  function preview()
91  {
92  global $ilCtrl, $ilAccess, $lng;
93 
94  return parent::preview();
95  }
96 
100  function showPage($a_no_title = false)
101  {
102  global $tpl, $ilCtrl;
103 
104  // get raw page content is used for including into other pages
105  if (!$this->getRawPageContent())
106  {
107  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
108  $tpl->setCurrentBlock("ContentStyle");
109  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
111  $tpl->parseCurrentBlock();
112 
113  $tpl->setCurrentBlock("SyntaxStyle");
114  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
116  $tpl->parseCurrentBlock();
117  }
118 
119  $this->setTemplateOutput(false);
120  if (!$a_no_title)
121  {
123  }
124  $output = parent::showPage();
125 
126  return $output;
127  }
128 
129  function getTabs($a_activate = "")
130  {
131  global $ilTabs, $ilCtrl;
132 
133  parent::getTabs($a_activate);
134  }
135 
142  function getRawContent()
143  {
144  $this->setRawPageContent(true);
145  $this->setLinkXML("");
146  return $this->showPage(true);
147  }
148 
149 }
150 ?>
getMediaPoolPage()
Get Media Pool Page Object.
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
getRawContent()
Get raw content.
getPageObject()
Get Page Object.
setTemplateOutput($a_output=true)
Class ilPageObjectGUI.
__construct($a_id=0, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
executeCommand()
execute command
$cmd
Definition: sahs_server.php:35
setPageObject($a_pg_obj)
Set Page Object.
global $ilCtrl
Definition: ilias.php:18
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
getRawPageContent()
Get Get raw page content only.
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
setPresentationTitle($a_title="")
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
setStyleId($a_styleid)
Set Style Id.
static lookupTitle($a_id)
Lookup title.
showPage($a_no_title=false)
Show page.
preview()
View media pool page.
global $ilDB
showPage()
display content of page
static getGUIForTitle($a_media_pool_id, $a_title, $a_old_nr=0)
Get media pool page gui for id and title.
setMediaPoolPage($a_media_pool_page)
Set Media Pool Page Object.
Class ilMediaPoolPage GUI class.