ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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  protected $tabs;
25 
29  public function __construct($a_id = 0, $a_old_nr = 0, $a_prevent_get_id = false, $a_lang = "")
30  {
31  global $DIC;
32 
33  $this->tpl = $DIC["tpl"];
34  $this->ctrl = $DIC->ctrl();
35  $this->tabs = $DIC->tabs();
36  $this->access = $DIC->access();
37  $this->lng = $DIC->language();
38  $tpl = $DIC["tpl"];
39 
40  parent::__construct("mep", $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
41 
42  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
44 
45  $this->setEditPreview(true);
46  }
47 
51  public function executeCommand()
52  {
54  $ilTabs = $this->tabs;
55 
56  $next_class = $this->ctrl->getNextClass($this);
57  $cmd = $this->ctrl->getCmd();
58 
59  switch ($next_class) {
60  default:
61  return parent::executeCommand();
62  }
63  }
64 
70  public function setMediaPoolPage($a_media_pool_page)
71  {
72  $this->setPageObject($a_media_pool_page);
73  }
74 
80  public function getMediaPoolPage()
81  {
82  return $this->getPageObject();
83  }
84 
88  public static function getGUIForTitle($a_media_pool_id, $a_title, $a_old_nr = 0)
89  {
90  global $DIC;
91 
92  $ilDB = $DIC->database();
93 
94  include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
95  $id = ilMediaPoolPage::getPageIdForTitle($a_media_pool_id, $a_title);
96  $page_gui = new ilMediaPoolPageGUI($id, $a_old_nr);
97 
98  return $page_gui;
99  }
100 
104  public function preview()
105  {
107  $ilAccess = $this->access;
108  $lng = $this->lng;
109 
110  return parent::preview();
111  }
112 
116  public function showPage($a_no_title = false)
117  {
118  $tpl = $this->tpl;
120 
121  // get raw page content is used for including into other pages
122  if (!$this->getRawPageContent()) {
123  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
124  $tpl->setCurrentBlock("ContentStyle");
125  $tpl->setVariable(
126  "LOCATION_CONTENT_STYLESHEET",
128  );
129  $tpl->parseCurrentBlock();
130 
131  $tpl->setCurrentBlock("SyntaxStyle");
132  $tpl->setVariable(
133  "LOCATION_SYNTAX_STYLESHEET",
135  );
136  $tpl->parseCurrentBlock();
137  }
138 
139  $this->setTemplateOutput(false);
140  if (!$a_no_title) {
142  }
143  $output = parent::showPage();
144 
145  return $output;
146  }
147 
148  public function getTabs($a_activate = "")
149  {
150  $ilTabs = $this->tabs;
152 
153  parent::getTabs($a_activate);
154  }
155 
162  public function getRawContent()
163  {
164  $this->setRawPageContent(true);
165  $this->setLinkXML("");
166  return $this->showPage(true);
167  }
168 }
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)
global $DIC
Definition: saml.php:7
Class ilPageObjectGUI.
__construct($a_id=0, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
executeCommand()
execute command
if(!array_key_exists('StateId', $_REQUEST)) $id
global $ilCtrl
Definition: ilias.php:18
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
setPageObject(ilPageObject $a_pg_obj)
Set Page Object.
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, $add_random=true)
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.