74 $this->lng->loadLanguageModule(
'content');
76 $this->backUrl = $request->getQueryParams()[
'backurl'] ??
'';
78 if (strlen($this->backUrl) > 0) {
79 $this->ctrl->setParameterByClass(
'ilcontentpagepagegui',
'backurl', rawurlencode($this->backUrl));
89 $pageObjectGUI = new \ilContentPagePageGUI($this->parentObject->getId(), 0, $isEmbedded);
92 $this->parentObject->getStyleSheetId(),
93 $this->parentObject->getType()
97 $pageObjectGUI->obj->addUpdateListener($this->parentObject,
'update');
99 return $pageObjectGUI;
108 $pageObject = new \ilContentPagePage();
109 $pageObject->setParentId($this->parentObject->getId());
110 $pageObject->setId($this->parentObject->getId());
111 $pageObject->createFromXML();
120 $backUrl = $this->ctrl->getLinkTargetByClass(
'ilObjContentPageGUI', self::UI_CMD_VIEW);
121 if (strlen($this->backUrl) > 0) {
124 $script = basename($backUrlParts[
'path']);
127 $script, $backUrlParts[
'query']
131 $this->tabs->setBackTarget($this->lng->txt(
'back'),
$backUrl);
139 $this->tabs->clearTargets();
146 $pageObjectGUI->setEnabledTabs(
true);
148 return $pageObjectGUI;
159 $pageObjectGUI->setEnabledTabs(
false);
161 $pageObjectGUI->setStyleId(
163 $this->parentObject->getStyleSheetId(),
164 $this->parentObject->getType()
168 return $pageObjectGUI;
179 $pageObjectGUI->setEnabledTabs(
false);
181 $pageObjectGUI->setStyleId(
183 $this->parentObject->getStyleSheetId(),
184 $this->parentObject->getType()
188 return $pageObjectGUI;
205 public function forward(
string $ctrlLink =
'') : string
207 switch ($this->presentationMode) {
208 case self::PRESENTATION_MODE_EDITING:
211 return (
string) $this->ctrl->forwardCommand($pageObjectGui);
213 case self::PRESENTATION_MODE_PRESENTATION:
216 if (is_string($ctrlLink) && strlen($ctrlLink) > 0) {
217 $pageObjectGUI->setFileDownloadLink($ctrlLink .
'&cmd=' . self::UI_CMD_COPAGE_DOWNLOAD_FILE);
218 $pageObjectGUI->setFullscreenLink($ctrlLink .
'&cmd=' . self::UI_CMD_COPAGE_DISPLAY_FULLSCREEN);
219 $pageObjectGUI->setSourcecodeDownloadScript($ctrlLink .
'&cmd=' . self::UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH);
222 return $this->ctrl->getHTML($pageObjectGUI);
224 case self::PRESENTATION_MODE_EMBEDDED_PRESENTATION:
227 if (is_string($ctrlLink) && strlen($ctrlLink) > 0) {
228 $pageObjectGUI->setFileDownloadLink($ctrlLink .
'&cmd=' . self::UI_CMD_COPAGE_DOWNLOAD_FILE);
229 $pageObjectGUI->setFullscreenLink($ctrlLink .
'&cmd=' . self::UI_CMD_COPAGE_DISPLAY_FULLSCREEN);
230 $pageObjectGUI->setSourcecodeDownloadScript($ctrlLink .
'&cmd=' . self::UI_CMD_COPAGE_DOWNLOAD_PARAGRAPH);
233 return $pageObjectGUI->getHTML();
236 throw new \ilException(
'Unknown presentation mode given');
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
Class ilContentPagePageCommandForwarder.
This class provides processing control methods.
Class ilContentPagePageGUI ilContentPagePageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI ilContentPagePageGUI: ilPublicUserProfileGUI, ilNoteGUI ilContentPagePageGUI: ilPropertyFormGUI, ilInternalLinkGUI.
foreach($paths as $path) $request
Interface ilContentPageObjectConstants.
buildPresentationPageObjectGUI()
const PRESENTATION_MODE_EMBEDDED_PRESENTATION
presentation mode for embedded presentation, e.g.
setPresentationMode(string $presentationMode)
buildEditingPageObjectGUI()
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
buildEmbeddedPresentationPageObjectGUI()
__construct(\Psr\Http\Message\ServerRequestInterface $request, \ilCtrl $ctrl, \ilTabsGUI $tabs, \ilLanguage $lng, \ilObjContentPage $parentObject)
ilContentPagePageCommandForwarder constructor.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
const PRESENTATION_MODE_PRESENTATION
presentation mode for requesting
getPageObjectGUI($isEmbedded=false)
setStyleId($a_styleid)
Set Style Id.
forward(string $ctrlLink='')
const PRESENTATION_MODE_EDITING
presentation mode for authoring