ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
4include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
5include_once("./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
6include_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;
109
110 return parent::preview();
111 }
112
116 public function showPage($a_no_title = false)
117 {
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",
134 ilObjStyleSheet::getSyntaxStylePath()
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
173 public function setTemplate($tpl)
174 {
175 $this->tpl = $tpl;
176 }
177}
An exception for terminatinating execution or to throw for unit testing.
static lookupTitle($a_id)
Lookup title.
Class ilMediaPoolPage GUI class.
__construct($a_id=0, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
getTabs($a_activate="")
adds tabs to tab gui object
executeCommand()
execute command
getRawContent()
Get raw content.
showPage($a_no_title=false)
Show page.
getMediaPoolPage()
Get Media Pool Page Object.
setMediaPoolPage($a_media_pool_page)
Set Media Pool Page Object.
static getGUIForTitle($a_media_pool_id, $a_title, $a_old_nr=0)
Get media pool page gui for id and title.
setTemplate($tpl)
Set template.
preview()
View media pool page.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
Class ilPageObjectGUI.
getRawPageContent()
Get Get raw page content only.
setPresentationTitle($a_title="")
showPage()
display content of page
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
getPageObject()
Get Page Object.
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
setTemplateOutput($a_output=true)
setStyleId($a_styleid)
Set Style Id.
setPageObject(ilPageObject $a_pg_obj)
Set Page Object.
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $ilDB
$DIC
Definition: xapitoken.php:46