ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilPageObjectGUI Class Reference

Class ilPageObjectGUI. More...

+ Inheritance diagram for ilPageObjectGUI:
+ Collaboration diagram for ilPageObjectGUI:

Public Member Functions

 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableChangeComments (bool $a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 getMetaDataLink ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML (object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, callable $a_callback=null, bool $export=false)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 afterDeleteContents ()
 

Static Public Member Functions

static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false, \ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 Get Tiny Menu. More...
 

Data Fields

const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $change_comments = false
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Protected Member Functions

 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 setBackToHistoryTabs ()
 
 checkLangPageAvailable (int $id, string $lang)
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Protected Attributes

ILIAS TestQuestionPool QuestionInfoService $questioninfo
 
ILIAS COPage Page PageManager $pm
 
ILIAS COPage Link LinkManager $link
 
ILIAS COPage InternalGUIService $gui
 
ILIAS COPage PC PCDefinition $pc_definition
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS Notes Service $notes
 
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 
ILIAS COPage Compare PageCompare $compare
 

Private Attributes

bool $abstract_only = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilPageObjectGUI::__construct ( string  $a_parent_type,
int  $a_id,
int  $a_old_nr = 0,
bool  $a_prevent_get_id = false,
string  $a_lang = "",
string  $concrete_lang = "" 
)
Parameters
string$a_parent_typetype of parent object
int$a_idpage id
int$a_old_nrhistory number (current version 0)
bool$a_prevent_get_idprevent getting id automatically from $_GET (e.g. set when concentInclude are included)
string$a_langlanguage ("" reads also $_GET["transl"], "-" forces master lang)

Definition at line 152 of file class.ilPageObjectGUI.php.

References $concrete_lang, $DIC, $requested_old_nr, ILIAS\Repository\access(), afterConstructor(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), getPageConfig(), getPageObject(), ILIAS\Repository\help(), initPageObject(), ILIAS\Repository\link(), ILIAS\Repository\lng(), setEnabledPageFocus(), setId(), setLanguage(), setOldNr(), setOutputMode(), setPageConfig(), setParentType(), setTemplateOutput(), ILIAS\Repository\toolbar(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

159  {
160  global $DIC;
161 
162  $this->log = ilLoggerFactory::getLogger('copg');
163  $this->tpl = $DIC->ui()->mainTemplate();
164  $this->ctrl = $DIC->ctrl();
165  $this->lng = $DIC->language();
166  $this->tabs_gui = $DIC->tabs();
167  $this->access = $DIC->access();
168  $this->user = $DIC->user();
169  $this->help = $DIC["ilHelp"];
170  $this->ui = $DIC->ui();
171  $this->toolbar = $DIC->toolbar();
172  $this->component_factory = $DIC["component.factory"];
173 
174  $this->request = $DIC
175  ->copage()
176  ->internal()
177  ->gui()
178  ->page()
179  ->editRequest();
180 
181  $this->questioninfo = $DIC->testQuestionPool()->questionInfo();
182 
183  $this->requested_old_nr = $this->request->getInt("old_nr");
184  $this->requested_transl = $this->request->getString("transl");
185  $this->requested_file_id = $this->request->getString("file_id");
186  $this->requested_ref_id = $this->request->getInt("ref_id");
187  $this->requested_pg_id = $this->request->getInt("pg_id");
188  $this->concrete_lang = $concrete_lang;
189 
190  $this->setParentType($a_parent_type);
191  $this->setId($a_id);
192  if ($a_old_nr == 0 && !$a_prevent_get_id && $this->requested_old_nr > 0) {
193  $a_old_nr = $this->requested_old_nr;
194  }
195  $this->setOldNr($a_old_nr);
196 
197  if ($a_lang == "" && $this->requested_transl != '') {
198  $this->setLanguage($this->requested_transl);
199  } else {
200  if ($a_lang == "") {
201  $a_lang = "-";
202  }
203  $this->setLanguage($a_lang);
204  }
205 
206 
207  $this->setOutputMode(self::PRESENTATION);
208  $this->setEnabledPageFocus(true);
209  $this->initPageObject();
210  $this->setPageConfig($this->getPageObject()->getPageConfig());
211 
212  $this->page_linker = new ilPageLinker(get_class($this));
213 
214  $this->output2template = true;
215 
216  $this->template_output_var = "PAGE_CONTENT";
217  $this->change_comments = false;
218  $this->page_back_title = $this->lng->txt("page");
219  $this->lng->loadLanguageModule("content");
220  $this->lng->loadLanguageModule("copg");
221 
222  $this->tool_context = $DIC->globalScreen()->tool()->context();
223 
224  $this->setTemplateOutput(false);
225 
226  $this->ctrl->saveParameter($this, "transl");
227 
228 
229  $this->requested_user_id = $this->request->getInt("user");
230  $this->requested_q_id = $this->request->getInt("q_id");
231  $this->requested_history_mode = $this->request->getInt("history_mode");
232 
233  $int_service = $DIC
234  ->copage()
235  ->internal();
236 
237  $this->edit_repo = $int_service
238  ->repo()
239  ->edit();
240 
241  $this->afterConstructor();
242  $this->xsl = $int_service->domain()->xsl();
243  $this->compare = $int_service->domain()->compare();
244  $this->pc_definition = $DIC
245  ->copage()
246  ->internal()
247  ->domain()
248  ->pc()
249  ->definition();
250  $this->gui = $DIC->copage()->internal()->gui();
251  $this->link = $DIC->copage()->internal()->domain()->link();
252  $this->pm = $DIC->copage()->internal()->domain()->page();
253  $this->editor_gui = $DIC->copage()->internal()->gui()->edit();
254  $this->notes = $DIC->notes();
255  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getLogger(string $a_component_id)
Get component logger.
setParentType(string $a_val)
setOutputMode(string $a_mode=self::PRESENTATION)
setLanguage(string $a_val)
setPageConfig(ilPageConfig $a_val)
setEnabledPageFocus(bool $a_enabledpagefocus)
setTemplateOutput(bool $a_output=true)
global $DIC
Definition: feed.php:28
initPageObject()
Init page object.
link(string $caption, string $href, bool $new_viewport=false)
setOldNr(int $a_val)
Set old nr (historic page)
+ Here is the call graph for this function:

Member Function Documentation

◆ activateMetaDataEditor()

ilPageObjectGUI::activateMetaDataEditor ( ilObject  $a_rep_obj,
string  $a_type,
int  $a_sub_obj_id,
object  $a_observer_obj = null,
string  $a_observer_func = "" 
)

Activate meda data editor.

Parameters
ilObject$a_rep_objobject as used in repository
string$a_type
int$a_sub_obj_id
object | null$a_observer_obj
string$a_observer_func

Definition at line 764 of file class.ilPageObjectGUI.php.

Referenced by ilMediaPoolPageGUI\setMediaPoolPage().

770  : void {
771  $this->use_meta_data = true;
772  $this->meta_data_rep_obj = $a_rep_obj;
773  $this->meta_data_sub_obj_id = $a_sub_obj_id;
774  $this->meta_data_type = $a_type;
775  $this->meta_data_observer_obj = $a_observer_obj;
776  $this->meta_data_observer_func = $a_observer_func;
777  }
+ Here is the caller graph for this function:

◆ activatePage()

ilPageObjectGUI::activatePage ( )

Definition at line 1035 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and getPageObject().

Referenced by ilBlogPostingGUI\activatePageToList().

1035  : void
1036  {
1037  $this->getPageObject()->setActivationStart(null);
1038  $this->getPageObject()->setActivationEnd(null);
1039  $this->getPageObject()->setActive(true);
1040  $this->getPageObject()->update();
1041  $this->ctrl->redirect($this, "edit");
1042  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addResourcesToTemplate()

ilPageObjectGUI::addResourcesToTemplate ( ilGlobalTemplateInterface  $tpl)
protected

Add resources to template.

Definition at line 3183 of file class.ilPageObjectGUI.php.

References ilGlobalTemplateInterface\addCss(), ilGlobalTemplateInterface\addJavaScript(), ilGlobalTemplateInterface\addOnLoadCode(), getOutputMode(), and getPageObject().

Referenced by showPage().

3183  : void
3184  {
3185  $collector = new \ILIAS\COPage\ResourcesCollector($this->getOutputMode(), $this->getPageObject());
3186 
3187  foreach ($collector->getJavascriptFiles() as $js) {
3188  $tpl->addJavaScript($js);
3189  }
3190 
3191  foreach ($collector->getCssFiles() as $css) {
3192  $tpl->addCss($css);
3193  }
3194 
3195  foreach ($collector->getOnloadCode() as $code) {
3196  $tpl->addOnLoadCode($code);
3197  }
3198  }
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterConstructor()

ilPageObjectGUI::afterConstructor ( )

Definition at line 262 of file class.ilPageObjectGUI.php.

Referenced by __construct().

262  : void
263  {
264  }
+ Here is the caller graph for this function:

◆ afterDeleteContents()

ilPageObjectGUI::afterDeleteContents ( )

Definition at line 3208 of file class.ilPageObjectGUI.php.

3208  : void
3209  {
3210  }

◆ checkLangPageAvailable()

ilPageObjectGUI::checkLangPageAvailable ( int  $id,
string  $lang 
)
protected

Definition at line 3101 of file class.ilPageObjectGUI.php.

References ilPageObject\_exists(), getPageObject(), and getParentType().

Referenced by switchToLanguage().

3101  : bool
3102  {
3103  $p = $this->getPageObject();
3104  return ilPageObject::_exists($this->getParentType(), $id, $lang);
3105  }
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists.
$lang
Definition: xapiexit.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compareVersion()

ilPageObjectGUI::compareVersion ( )

Compares two revisions of the page.

Definition at line 2766 of file class.ilPageObjectGUI.php.

References $obj, ilGlobalTemplateInterface\get(), getEnableEditing(), ilPageObjectFactory\getInstance(), getPageConfig(), getPageObject(), getPresentationTitle(), ILIAS\Repository\lng(), replaceDiffTags(), setBackToHistoryTabs(), setCompareMode(), setOutputMode(), setPageObject(), setPresentationTitle(), ilGlobalTemplateInterface\setVariable(), and showPage().

2766  : string
2767  {
2768  if (!$this->getEnableEditing()) {
2769  return "";
2770  }
2771  $this->setBackToHistoryTabs();
2772  $tpl = new ilTemplate("tpl.page_compare.html", true, true, "Services/COPage");
2773 
2774  $pg = $this->obj;
2775  $l_page = ilPageObjectFactory::getInstance($pg->getParentType(), $pg->getId(), $this->request->getInt("left"), $pg->getLanguage());
2776  $r_page = ilPageObjectFactory::getInstance($pg->getParentType(), $pg->getId(), $this->request->getInt("right"), $pg->getLanguage());
2777 
2778  $compare = $this->compare->compare(
2779  $this->getPageObject(),
2780  $l_page,
2781  $r_page
2782  );
2783 
2784  // left page
2785  $lpage = $compare["l_page"];
2786  $cfg = $this->getPageConfig();
2787  $cfg->setPreventHTMLUnmasking(true);
2788 
2789  $this->setOutputMode(self::PREVIEW);
2790  $this->setPageObject($lpage);
2791  $this->setPresentationTitle($this->getPresentationTitle());
2792  $this->setCompareMode(true);
2793 
2794  $lhtml = $this->showPage();
2795  $lhtml = $this->replaceDiffTags($lhtml);
2796  $lhtml = str_replace("&lt;br /&gt;", "<br />", $lhtml);
2797  $tpl->setVariable("LEFT", $lhtml);
2798 
2799  // right page
2800  $rpage = $compare["r_page"];
2801  $this->setPageObject($rpage);
2802  $this->setPresentationTitle($this->getPresentationTitle());
2803  $this->setCompareMode(true);
2804  $this->setOutputMode(self::PREVIEW);
2805 
2806  $rhtml = $this->showPage();
2807  $rhtml = $this->replaceDiffTags($rhtml);
2808  $rhtml = str_replace("&lt;br /&gt;", "<br />", $rhtml);
2809  $tpl->setVariable("RIGHT", $rhtml);
2810 
2811  $tpl->setVariable("TXT_NEW", $this->lng->txt("cont_pc_new"));
2812  $tpl->setVariable("TXT_MODIFIED", $this->lng->txt("cont_pc_modified"));
2813  $tpl->setVariable("TXT_DELETED", $this->lng->txt("cont_pc_deleted"));
2814 
2815  return $tpl->get();
2816  }
setOutputMode(string $a_mode=self::PRESENTATION)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
replaceDiffTags(string $a_html)
ilGlobalTemplateInterface $tpl
setPageObject(ilPageObject $a_pg_obj)
setPresentationTitle(string $a_title="")
ILIAS COPage Compare PageCompare $compare
showPage()
display content of page
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
+ Here is the call graph for this function:

◆ confirmPageTranslationCreation()

ilPageObjectGUI::confirmPageTranslationCreation ( )

Confirm page translation creation.

Definition at line 3110 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by switchToLanguage().

3110  : void
3111  {
3112  $l = $this->request->getString("totransl");
3113  $this->ctrl->setParameter($this, "totransl", $l);
3114  $this->lng->loadLanguageModule("meta");
3115 
3116  $cgui = new ilConfirmationGUI();
3117  $cgui->setFormAction($this->ctrl->getFormAction($this));
3118  $cgui->setHeaderText($this->lng->txt("cont_page_translation_does_not_exist") . ": " .
3119  $this->lng->txt("meta_l_" . $l));
3120  $cgui->setCancel($this->lng->txt("cancel"), "editMasterLanguage");
3121  $cgui->setConfirm($this->lng->txt("confirm"), "createPageTranslation");
3122  $this->tpl->setContent($cgui->getHTML());
3123  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createPageTranslation()

ilPageObjectGUI::createPageTranslation ( )

Create page translation.

Definition at line 3137 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), getId(), ilPageObjectFactory\getInstance(), getPageObject(), and getParentType().

3137  : void
3138  {
3139  $l = $this->request->getString("totransl");
3140 
3142  $this->getPageObject()->getParentType(),
3143  $this->getPageObject()->getId(),
3144  0,
3145  "-"
3146  );
3147 
3148  $p->copyPageToTranslation($l);
3149  $this->ctrl->setParameter($this, "transl", $l);
3150  $this->ctrl->redirect($this, "edit");
3151  }
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
+ Here is the call graph for this function:

◆ deactivatePage()

ilPageObjectGUI::deactivatePage ( )

Definition at line 1026 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and getPageObject().

Referenced by ilBlogPostingGUI\deactivatePageToList().

1026  : void
1027  {
1028  $this->getPageObject()->setActivationStart(null);
1029  $this->getPageObject()->setActivationEnd(null);
1030  $this->getPageObject()->setActive(false);
1031  $this->getPageObject()->update();
1032  $this->ctrl->redirect($this, "edit");
1033  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineFileDownloadLink()

ilPageObjectGUI::determineFileDownloadLink ( )

Definition at line 779 of file class.ilPageObjectGUI.php.

References $file_download_link, ILIAS\Repository\ctrl(), getFileDownloadLink(), and getOutputMode().

Referenced by showPage().

779  : string
780  {
782  if ($this->getFileDownloadLink() == "" && $this->getOutputMode() != "offline") {
783  $file_download_link = $this->ctrl->getLinkTarget($this, "downloadFile");
784  }
785  return $file_download_link;
786  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineFullscreenLink()

ilPageObjectGUI::determineFullscreenLink ( )

Definition at line 788 of file class.ilPageObjectGUI.php.

References $fullscreen_link, ILIAS\Repository\ctrl(), getFullscreenLink(), and getOutputMode().

Referenced by showPage().

788  : string
789  {
791  if ($this->getFullscreenLink() == "" && $this->getOutputMode() != "offline") {
792  $fullscreen_link = $this->ctrl->getLinkTarget($this, "displayMediaFullscreen", "", false, false);
793  }
794  return $fullscreen_link;
795  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineSourcecodeDownloadScript()

ilPageObjectGUI::determineSourcecodeDownloadScript ( )

Definition at line 797 of file class.ilPageObjectGUI.php.

References $sourcecode_download_script, ILIAS\Repository\ctrl(), and getOutputMode().

Referenced by showPage().

797  : string
798  {
800  if ($this->sourcecode_download_script == "" && $this->getOutputMode() != "offline") {
801  $l = $this->ctrl->getLinkTarget($this, "");
802  }
803  return $l;
804  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayMedia()

ilPageObjectGUI::displayMedia ( bool  $a_fullscreen = false)

Definition at line 2143 of file class.ilPageObjectGUI.php.

References $link_xml, $params, ilMediaItem\_getMapAreasIntLinks(), ilGlobalTemplateInterface\addCss(), exit, ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), getPageObject(), ilUtil\getStyleSheetLocation(), ilFileUtils\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, ilObjMediaObjectGUI\includePresentationJS(), ilObjMediaObject\isTypeAllowed(), ilGlobalTemplateInterface\printToStdout(), ilGlobalTemplateInterface\setCurrentBlock(), and ilGlobalTemplateInterface\setVariable().

Referenced by displayMediaFullscreen().

2143  : void
2144  {
2145  $tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "Modules/LearningModule");
2146  $tpl->setCurrentBlock("ilMedia");
2147 
2148  //$int_links = $page_object->getInternalLinks();
2149  $med_links = ilMediaItem::_getMapAreasIntLinks($this->request->getMobId());
2150 
2151  // @todo
2152  $link_xml = $this->page_linker->getLinkXML($med_links);
2153 
2154  $media_obj = new ilObjMediaObject($this->request->getMobId());
2155  if ($this->request->getPageType() === "mep") {
2156  $pg_obj = new ilMediaPoolPage($this->request->getPageId());
2157  } else {
2158  $pg_obj = $this->getPageObject();
2159  }
2160  $pg_obj->buildDom();
2161 
2162  $xml = "<dummy>";
2163  if ($this->requested_pg_id > 0) {
2164  $xml .= $pg_obj->getMediaAliasElement($this->request->getMobId());
2165  } else {
2166  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
2167  }
2168  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
2169  $xml .= $link_xml;
2170  $xml .= "</dummy>";
2171 
2172  $mode = "media";
2173  if ($a_fullscreen) {
2174  $mode = "fullscreen";
2175  }
2176 
2177  //echo "XML:".htmlentities($xml);
2178  // determine target frames for internal links
2179  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
2180  $enlarge_path = ilUtil::getImagePath("media/enlarge.svg");
2181  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
2182  'link_params' => "ref_id=" . $this->requested_ref_id,'fullscreen_link' => "",
2183  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
2184  'ref_id' => $this->requested_ref_id, 'webspace_path' => $wb_path);
2185  $output = $this->xsl->process($xml, $params);
2186 
2187  // unmask user html
2190  $tpl->setVariable("MEDIA_CONTENT", $output);
2191 
2192  // add js
2194  //$tpl->fillJavaScriptFiles();
2195  //$tpl->fillCssFiles();
2196 
2197  $tpl->printToStdout();
2198  exit;
2199  }
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
static getWebspaceDir(string $mode="filesystem")
get webspace directory
exit
Definition: login.php:29
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
static includePresentationJS(ilGlobalTemplateInterface $a_tpl=null)
Include media object presentation JS.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static isTypeAllowed(string $a_type)
ilGlobalTemplateInterface $tpl
static _getMapAreasIntLinks(int $a_mob_id)
get all internal links of map areas of a mob
const IL_MODE_ALIAS
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
const IL_MODE_OUTPUT
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displayMediaFullscreen()

ilPageObjectGUI::displayMediaFullscreen ( )

Definition at line 2138 of file class.ilPageObjectGUI.php.

References displayMedia().

2138  : void
2139  {
2140  $this->displayMedia(true);
2141  }
displayMedia(bool $a_fullscreen=false)
+ Here is the call graph for this function:

◆ displayValidationError()

ilPageObjectGUI::displayValidationError (   $a_error)

display validation error

Parameters
string | array$a_errorerror string

Definition at line 2581 of file class.ilPageObjectGUI.php.

Referenced by showPage().

2581  : void
2582  {
2583  if (is_array($a_error)) {
2584  $error_str = "<strong>Error(s):</strong><br>";
2585  foreach ($a_error as $error) {
2586  $err_mess = implode(" - ", $error);
2587  if (!is_int(strpos($err_mess, ":0:"))) {
2588  $error_str .= htmlentities($err_mess) . "<br />";
2589  }
2590  }
2591  $this->tpl->setVariable("MESSAGE", $error_str);
2592  }
2593  }
+ Here is the caller graph for this function:

◆ download_paragraph()

ilPageObjectGUI::download_paragraph ( )

download source code paragraph

Definition at line 2204 of file class.ilPageObjectGUI.php.

References getPageObject().

2204  : void
2205  {
2206  $pg_obj = $this->getPageObject();
2207  $pg_obj->buildDom();
2208  $pg_obj->sendParagraph(
2209  $this->request->getString("par_id"),
2210  $this->request->getString("downloadtitle")
2211  );
2212  }
+ Here is the call graph for this function:

◆ downloadFile()

ilPageObjectGUI::downloadFile ( )

Definition at line 2128 of file class.ilPageObjectGUI.php.

References getPageObject().

2128  : void
2129  {
2130  $this->getPageObject()->buildDom();
2131  $cm = $this->pm->content($this->getPageObject()->getDomDoc());
2132  $cm->downloadFile(
2133  $this->getPageObject(),
2134  $this->requested_file_id
2135  );
2136  }
+ Here is the call graph for this function:

◆ edit()

ilPageObjectGUI::edit ( )

Definition at line 2484 of file class.ilPageObjectGUI.php.

References getNotesHTML(), isEnabledNotes(), setOutputMode(), and showPage().

Referenced by executeCommand(), and insertJSAtPlaceholder().

2484  : string
2485  {
2486  $this->setOutputMode(self::EDIT);
2487  $html = $this->showPage();
2488 
2489  if ($this->isEnabledNotes()) {
2490  $html .= "<br /><br />" . $this->getNotesHTML();
2491  }
2492 
2493  return $html;
2494  }
setOutputMode(string $a_mode=self::PRESENTATION)
showPage()
display content of page
getNotesHTML(object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, callable $a_callback=null, bool $export=false)
Get html for public and/or private notes.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editActivation()

ilPageObjectGUI::editActivation ( )

Edit activation (only, if scheduled page activation is activated in administration)

Definition at line 2831 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\form(), getActivationFormValues(), initActivationForm(), and setBackToEditTabs().

2831  : void
2832  {
2833  $this->setBackToEditTabs();
2834 
2835  $atpl = new ilTemplate("tpl.page_activation.php", true, true, "Services/COPage");
2836  $this->initActivationForm();
2837  $this->getActivationFormValues();
2838  $atpl->setVariable("FORM", $this->form->getHTML());
2839  $this->tpl->setContent($atpl->get());
2840  }
initActivationForm()
Init activation form.
getActivationFormValues()
Get values for activation form.
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ editMasterLanguage()

ilPageObjectGUI::editMasterLanguage ( )

Edit master language.

Definition at line 3128 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl().

3128  : void
3129  {
3130  $this->ctrl->setParameter($this, "transl", "-");
3131  $this->ctrl->redirect($this, "edit");
3132  }
+ Here is the call graph for this function:

◆ enableChangeComments()

ilPageObjectGUI::enableChangeComments ( bool  $a_enabled)

Definition at line 529 of file class.ilPageObjectGUI.php.

529  : void
530  {
531  $this->change_comments = $a_enabled;
532  }

◆ enableNotes()

ilPageObjectGUI::enableNotes ( bool  $a_enabled,
int  $a_parent_id 
)

Definition at line 539 of file class.ilPageObjectGUI.php.

539  : void
540  {
541  $this->notes_enabled = $a_enabled;
542  $this->notes_parent_id = $a_parent_id;
543  }

◆ executeCommand()

ilPageObjectGUI::executeCommand ( )

execute command

Definition at line 830 of file class.ilPageObjectGUI.php.

References $requested_q_id, assQuestionGUI\_getQuestionGUI(), ilObject\_lookupOwner(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), edit(), getEnableEditing(), getHeader(), getOutputMode(), getPageConfig(), getPageObject(), getParentType(), getTabs(), getViewPageLink(), getViewPageTarget(), getViewPageText(), initOpenedContentForm(), ILIAS\Repository\lng(), onFeedbackEditingForwarding(), setBackToEditTabs(), setEditorToolContext(), setQEditTabs(), and showEditToolbar().

830  : string
831  {
832  $ret = "";
833  $next_class = $this->ctrl->getNextClass($this);
834  if ($next_class !== "") {
835  $this->ctrl->setReturn($this, "edit");
836  }
837  $this->log->debug("next_class: " . $next_class);
838  if ($next_class == "" && $this->ctrl->getCmd() == "edit") {
839  $this->tabs_gui->clearTargets();
840  } else {
841  $this->getTabs();
842  }
843 
844 
845  switch ($next_class) {
846  case 'ilobjectmetadatagui':
847  $this->setBackToEditTabs();
848  $md_gui = new ilObjectMetaDataGUI($this->meta_data_rep_obj, $this->meta_data_type, $this->meta_data_sub_obj_id);
849  if (is_object($this->meta_data_observer_obj)) {
850  $md_gui->addMDObserver(
851  $this->meta_data_observer_obj,
852  $this->meta_data_observer_func,
853  "General"
854  );
855  }
856  // set adv metadata record dobject
857  if ($this->adv_type != "") {
858  $md_gui->setAdvMdRecordObject($this->adv_ref_id, $this->adv_type, $this->adv_subtype);
859  }
860  $this->ctrl->forwardCommand($md_gui);
861  break;
862 
863  case "ileditclipboardgui":
864  $this->setBackToEditTabs();
865  $clip_gui = new ilEditClipboardGUI();
866  $clip_gui->setPageBackTitle($this->page_back_title);
867  $ret = $this->ctrl->forwardCommand($clip_gui);
868  break;
869 
870  // notes
871  case "ilnotegui":
872  case "ilcommentgui":
873  $html = $this->edit();
874  $this->tabs_gui->setTabActive("edit");
875  return $html;
876 
877  case 'ilpublicuserprofilegui':
878  $profile_gui = new ilPublicUserProfileGUI($this->requested_user_id);
879  $ret = $this->ctrl->forwardCommand($profile_gui);
880  break;
881 
882  case "ilpageeditorgui":
883  $this->setEditorToolContext();
884 
885  if (!$this->getEnableEditing()) {
886  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
887  $this->ctrl->redirect($this, "preview");
888  }
889  $page_editor = new ilPageEditorGUI($this->getPageObject(), $this);
890  $page_editor->setHeader($this->getHeader());
891  $page_editor->setPageBackTitle($this->page_back_title);
892  $page_editor->setIntLinkReturn($this->int_link_return);
893  //$page_editor->executeCommand();
894  $ret = $this->ctrl->forwardCommand($page_editor);
895  break;
896 
897  case 'ilnewsitemgui':
898  $news_item_gui = new ilNewsItemGUI();
899  $news_item_gui->setEnableEdit(true);
900  $news_item_gui->setContextObjId($this->news_obj_id);
901  $news_item_gui->setContextObjType($this->news_obj_type);
902  $news_item_gui->setContextSubObjId($this->obj->getId());
903  $news_item_gui->setContextSubObjType("pg");
904 
905  $ret = $this->ctrl->forwardCommand($news_item_gui);
906  break;
907 
908  case "ilpropertyformgui":
909  $form = $this->initOpenedContentForm();
910  $this->ctrl->forwardCommand($form);
911  break;
912 
913  case "ilinternallinkgui":
914  $this->lng->loadLanguageModule("content");
915  $link_gui = new ilInternalLinkGUI("Media_Media", 0);
916 
917  $link_gui->filterLinkType("PageObject_FAQ");
918  $link_gui->filterLinkType("GlossaryItem");
919  $link_gui->filterLinkType("Media_Media");
920  $link_gui->filterLinkType("Media_FAQ");
921 
922  $link_gui->setFilterWhiteList(true);
923  $this->ctrl->forwardCommand($link_gui);
924  break;
925 
926  case "ilquestioneditgui":
927  $this->setQEditTabs("question");
928  $edit_gui = new ilQuestionEditGUI();
929  $edit_gui->setPageConfig($this->getPageConfig());
930  $edit_gui->setSelfAssessmentEditingMode(true);
931  $ret = $this->ctrl->forwardCommand($edit_gui);
932  $this->tpl->setContent($ret);
933  break;
934 
935  case 'ilassquestionfeedbackeditinggui':
936 
938 
939  // set tabs
940  $this->setQEditTabs("feedback");
941 
942  // load required lang mods
943  $this->lng->loadLanguageModule("assessment");
944 
945  // set context tabs
946  $questionGUI = assQuestionGUI::_getQuestionGUI(
947  $this->questioninfo->getQuestionType(
948  $this->requested_q_id
949  ),
951  );
952  $questionGUI->object->setObjId(0);
953  $questionGUI->object->setSelfAssessmentEditingMode(true);
954  $questionGUI->object->setPreventRteUsage($this->getPageConfig()->getPreventRteUsage());
955 
956  // forward to ilAssQuestionFeedbackGUI
957  $gui = new ilAssQuestionFeedbackEditingGUI($questionGUI, $this->ctrl, $this->access, $this->tpl, $this->tabs_gui, $this->lng);
958  $this->ctrl->forwardCommand($gui);
959  break;
960 
961 
962  case 'ilLearninghistorygui':
963  $user_id = null;
964  if ($this->getPageObject()->getParentType() == "prtf") {
965  $user_id = ilObject::_lookupOwner($this->getPageObject()->getPortfolioId());
966  }
967  $hist_gui = new ilLearningHistoryGUI();
968  $hist_gui->setUserId($user_id);
969  $this->ctrl->forwardCommand($hist_gui);
970  break;
971 
972  default:
973  $cmd = $this->ctrl->getCmd("preview");
974  // presentation view
975  if ($this->getViewPageLink() != "" && $cmd != "edit") {
976  $this->tabs_gui->addNonTabbedLink(
977  "pres_view",
978  $this->getViewPageText(),
979  $this->getViewPageLink(),
980  $this->getViewPageTarget()
981  );
982  }
983  $ret = $this->$cmd();
984  if ($this->getOutputMode() == self::PREVIEW && $cmd == "preview") {
985  $this->showEditToolbar();
986  }
987  break;
988  }
989  //echo "+$ret+";
990  return (string) $ret;
991  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setEditorToolContext()
Set editor tool context.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
User Interface for NewsItem entities.
ILIAS COPage InternalGUIService $gui
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
Internal link selector.
setQEditTabs(string $a_active)
Set question editing tabs.
showEditToolbar()
Show edit toolbar.
static _getQuestionGUI(string $question_type='', int $question_id=-1)
Creates a question gui representation and returns the alias to the question gui.
Page Editor GUI class.
GUI class for public user profile presentation.
getTabs(string $a_activate="")
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ finishEditing()

ilPageObjectGUI::finishEditing ( )

Definition at line 3163 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl().

Referenced by releasePageLock().

3163  : void
3164  {
3165  $this->ctrl->redirect($this, "preview");
3166  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAbstractOnly()

ilPageObjectGUI::getAbstractOnly ( )

Definition at line 726 of file class.ilPageObjectGUI.php.

References $abstract_only.

Referenced by insertAdvTrigger(), ilBlogPostingGUI\showPage(), ilWikiPageGUI\showPage(), showPage(), and ilBlogPostingGUI\showPageHeading().

726  : bool
727  {
728  return $this->abstract_only;
729  }
+ Here is the caller graph for this function:

◆ getActivationCaptions()

ilPageObjectGUI::getActivationCaptions ( )

Get captions for activation action menu entries.

Definition at line 1688 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\lng().

1688  : array
1689  {
1690  return array("deactivatePage" => $this->lng->txt("cont_deactivate_page"),
1691  "activatePage" => $this->lng->txt("cont_activate_page"));
1692  }
+ Here is the call graph for this function:

◆ getActivationFormValues()

ilPageObjectGUI::getActivationFormValues ( )

Get values for activation form.

Definition at line 2885 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\form(), getPageObject(), and IL_CAL_DATETIME.

Referenced by editActivation().

2885  : void
2886  {
2887  $activation = "deactivated";
2888  if ($this->getPageObject()->getActive()) {
2889  $activation = "activated";
2890  }
2891 
2892  $dt_prop = $this->form->getItemByPostVar("start");
2893  if ($this->getPageObject()->getActivationStart() != "") {
2894  $activation = "scheduled";
2895  $dt_prop->setDate(new ilDateTime(
2896  $this->getPageObject()->getActivationStart(),
2898  ));
2899  }
2900  $dt_prop = $this->form->getItemByPostVar("end");
2901  if ($this->getPageObject()->getActivationEnd() != "") {
2902  $activation = "scheduled";
2903  $dt_prop->setDate(new ilDateTime(
2904  $this->getPageObject()->getActivationEnd(),
2906  ));
2907  }
2908 
2909  $this->form->getItemByPostVar("activation")->setValue($activation);
2910  $this->form->getItemByPostVar("show_activation_info")->setChecked($this->getPageObject()->getShowActivationInfo());
2911  }
const IL_CAL_DATETIME
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAdditionalPageActions()

ilPageObjectGUI::getAdditionalPageActions ( )

Get additional page actions.

Definition at line 3203 of file class.ilPageObjectGUI.php.

3203  : array
3204  {
3205  return [];
3206  }

◆ getAdvMdRecordObject()

ilPageObjectGUI::getAdvMdRecordObject ( )

Get adv md record type.

Definition at line 283 of file class.ilPageObjectGUI.php.

References $adv_ref_id, $adv_subtype, and $adv_type.

283  : ?array
284  {
285  if ($this->adv_type === null) {
286  return null;
287  }
289  }

◆ getBlockingInfoMessage()

ilPageObjectGUI::getBlockingInfoMessage ( )

Definition at line 2496 of file class.ilPageObjectGUI.php.

References $ui, ilDatePresentation\formatDate(), getPageObject(), IL_CAL_UNIX, and ILIAS\Repository\lng().

2496  : string
2497  {
2498  $ui = $this->ui;
2499 
2500  $lock = $this->getPageObject()->getEditLockInfo();
2501  $info = $this->lng->txt("cont_got_lock_release");
2502  $info = str_replace("%1", ilDatePresentation::formatDate(new ilDateTime($lock["edit_lock_until"], IL_CAL_UNIX)), $info);
2503 
2504  $mbox = $ui->factory()->messageBox()->info($info);
2505 
2506  return $ui->renderer()->render($mbox);
2507  }
ILIAS DI UIServices $ui
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
+ Here is the call graph for this function:

◆ getCompareMode()

ilPageObjectGUI::getCompareMode ( )

Definition at line 710 of file class.ilPageObjectGUI.php.

References $compare_mode.

Referenced by showPage().

710  : bool
711  {
712  return $this->compare_mode;
713  }
+ Here is the caller graph for this function:

◆ getComponentPluginsXML()

ilPageObjectGUI::getComponentPluginsXML ( )

Put information about activated plugins into XML.

Definition at line 809 of file class.ilPageObjectGUI.php.

References XapiProxy\$plugin, getOutputMode(), and ilPageComponentPlugin\TXT_CMD_INSERT.

Referenced by showPage().

809  : string
810  {
811  $xml = "";
812  if ($this->getOutputMode() == "edit") {
813  foreach ($this->component_factory->getActivePluginsInSlot("pgcp") as $plugin) {
814  if ($plugin->isValidParentType($this->getPageObject()->getParentType())) {
815  $xml .= '<ComponentPlugin Name="' . $plugin->getPluginName() .
816  '" InsertText="' . $plugin->txt(ilPageComponentPlugin::TXT_CMD_INSERT) . '" />';
817  }
818  }
819  }
820  if ($xml != "") {
821  $xml = "<ComponentPlugins>" . $xml . "</ComponentPlugins>";
822  }
823  return $xml;
824  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDisabledText()

ilPageObjectGUI::getDisabledText ( )

Definition at line 741 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\lng().

Referenced by showPage().

741  : string
742  {
743  return $this->lng->txt("inactive");
744  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditPreview()

ilPageObjectGUI::getEditPreview ( )

Definition at line 627 of file class.ilPageObjectGUI.php.

References $editpreview.

Referenced by getTabs().

627  : bool
628  {
629  return $this->editpreview;
630  }
+ Here is the caller graph for this function:

◆ getEnabledHref()

ilPageObjectGUI::getEnabledHref ( )

Definition at line 746 of file class.ilPageObjectGUI.php.

References $enabled_href.

Referenced by ilWikiPageGUI\postOutputProcessing(), and showPage().

746  : bool
747  {
748  return $this->enabled_href;
749  }
+ Here is the caller graph for this function:

◆ getEnabledNews()

ilPageObjectGUI::getEnabledNews ( )

Definition at line 606 of file class.ilPageObjectGUI.php.

References $enabled_news.

606  : bool
607  {
608  return $this->enabled_news;
609  }

◆ getEnabledPageFocus()

ilPageObjectGUI::getEnabledPageFocus ( )

Definition at line 657 of file class.ilPageObjectGUI.php.

References $enabledpagefocus.

Referenced by showPage().

657  : bool
658  {
660  }
+ Here is the caller graph for this function:

◆ getEnabledTabs()

ilPageObjectGUI::getEnabledTabs ( )

Definition at line 637 of file class.ilPageObjectGUI.php.

References $tabs_enabled.

Referenced by getTabs().

637  : bool
638  {
639  return $this->tabs_enabled;
640  }
+ Here is the caller graph for this function:

◆ getEnableEditing()

ilPageObjectGUI::getEnableEditing ( )

◆ getEnablePCType()

ilPageObjectGUI::getEnablePCType ( string  $a_pc_type)

Definition at line 360 of file class.ilPageObjectGUI.php.

References getPageConfig().

Referenced by insertResources(), and showPage().

360  : bool
361  {
362  return $this->getPageConfig()->getEnablePCType($a_pc_type);
363  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFileDownloadLink()

ilPageObjectGUI::getFileDownloadLink ( )

Definition at line 509 of file class.ilPageObjectGUI.php.

References $file_download_link.

Referenced by determineFileDownloadLink().

509  : string
510  {
512  }
+ Here is the caller graph for this function:

◆ getFullscreenLink()

ilPageObjectGUI::getFullscreenLink ( )

Definition at line 519 of file class.ilPageObjectGUI.php.

References $fullscreen_link.

Referenced by determineFullscreenLink().

519  : string
520  {
521  return $this->fullscreen_link;
522  }
+ Here is the caller graph for this function:

◆ getHeader()

ilPageObjectGUI::getHeader ( )

Definition at line 424 of file class.ilPageObjectGUI.php.

References $header.

Referenced by ilTestExpressPageObjectGUI\executeCommand(), and executeCommand().

424  : string
425  {
426  return $this->header;
427  }
+ Here is the caller graph for this function:

◆ getHTML()

ilPageObjectGUI::getHTML ( )

Definition at line 2525 of file class.ilPageObjectGUI.php.

References getTabs(), and showPage().

2525  : string
2526  {
2527  $this->getTabs("preview");
2528  return $this->showPage();
2529  }
getTabs(string $a_activate="")
showPage()
display content of page
+ Here is the call graph for this function:

◆ getId()

◆ getLanguage()

ilPageObjectGUI::getLanguage ( )

Definition at line 344 of file class.ilPageObjectGUI.php.

References $language, and ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by initPageObject(), ilWikiPageGUI\observeNoteAction(), and ilWikiPageGUI\renamePage().

344  : string
345  {
346  if ($this->language == "") {
347  return "-";
348  }
349 
350  return $this->language;
351  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLinkFrame()

ilPageObjectGUI::getLinkFrame ( )

Definition at line 444 of file class.ilPageObjectGUI.php.

References $link_frame.

444  : string
445  {
446  return $this->link_frame;
447  }

◆ getLinkParams()

ilPageObjectGUI::getLinkParams ( )

Definition at line 434 of file class.ilPageObjectGUI.php.

References $link_params.

434  : string
435  {
436  return $this->link_params;
437  }

◆ getLinkXML()

ilPageObjectGUI::getLinkXML ( )

Definition at line 454 of file class.ilPageObjectGUI.php.

References $link_xml.

Referenced by ilForumPageGUI\finishEditing(), ilContentPagePageGUI\getProfileBackUrl(), and showPage().

454  : string
455  {
456  return $this->link_xml;
457  }
+ Here is the caller graph for this function:

◆ getMetaDataLink()

ilPageObjectGUI::getMetaDataLink ( )

Definition at line 2697 of file class.ilPageObjectGUI.php.

2697  : string
2698  {
2699  $mdtab = "";
2700  if ($this->use_meta_data) {
2701  $mdgui = new ilObjectMetaDataGUI(
2702  $this->meta_data_rep_obj,
2703  $this->meta_data_type,
2704  $this->meta_data_sub_obj_id
2705  );
2706  $mdtab = $mdgui->getTab();
2707  if ($mdtab) {
2708  $this->tabs_gui->addTarget(
2709  "meta_data",
2710  $mdtab,
2711  "",
2712  "ilobjectmetadatagui"
2713  );
2714  }
2715  }
2716  return (string) $mdtab;
2717  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ getNotesHTML()

ilPageObjectGUI::getNotesHTML ( object  $a_content_object = null,
bool  $a_enable_private_notes = true,
bool  $a_enable_public_notes = false,
bool  $a_enable_notes_deletion = false,
callable  $a_callback = null,
bool  $export = false 
)

Get html for public and/or private notes.

Definition at line 2951 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl().

Referenced by edit(), ilBlogPostingGUI\getCommentsHTMLExport(), ilWikiPageGUI\getCommentsHTMLExport(), ilBlogPostingGUI\preview(), and ilWikiPageGUI\preview().

2958  : string {
2959  // scorm 2004 page gui
2960  if (!$a_content_object) {
2961  throw new ilException("No content object given.");
2962  /*
2963  $notes_gui = new ilNoteGUI(
2964  $this->notes_parent_id,
2965  $this->obj->getId(),
2966  "pg"
2967  );
2968 
2969  $a_enable_private_notes = true;
2970  $a_enable_public_notes = true;
2971  $a_enable_notes_deletion = false;
2972  $notes_gui->setUseObjectTitleHeader(false);*/
2973  }
2974  // wiki page gui, blog posting gui
2975  else {
2976  /*
2977  $notes_gui = new ilNoteGUI(
2978  $a_content_object->getParentId(),
2979  $a_content_object->getId(),
2980  $a_content_object->getParentType()
2981  );*/
2982  $comments_gui = $this->notes->gui()->getCommentsGUI(
2983  $a_content_object->getParentId(),
2984  $a_content_object->getId(),
2985  $a_content_object->getParentType()
2986  );
2987  $comments_gui->setUseObjectTitleHeader(false);
2988  }
2989 
2990  if ($a_enable_private_notes) {
2991  $comments_gui->enablePrivateNotes();
2992  }
2993  if ($a_enable_public_notes) {
2994  $comments_gui->enablePublicNotes();
2995  if ($a_enable_notes_deletion) {
2996  $comments_gui->enablePublicNotesDeletion(true);
2997  }
2998  }
2999  if ($export) {
3000  $comments_gui->setExportMode();
3001  }
3002 
3003  if ($a_callback) {
3004  $comments_gui->addObserver($a_callback);
3005  }
3006 
3007  $next_class = $this->ctrl->getNextClass($this);
3008  if (in_array($next_class, ["ilnotegui", "ilcommentgui"])) {
3009  $html = $this->ctrl->forwardCommand($comments_gui);
3010  } else {
3011  $html = $comments_gui->getListHTML();
3012  }
3013  return $html;
3014  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOfflineDirectory()

ilPageObjectGUI::getOfflineDirectory ( )

Definition at line 558 of file class.ilPageObjectGUI.php.

References $offline_directory.

558  : string
559  {
561  }

◆ getOldNr()

ilPageObjectGUI::getOldNr ( )

Definition at line 334 of file class.ilPageObjectGUI.php.

References $old_nr.

Referenced by initPageObject().

334  : int
335  {
336  return $this->old_nr;
337  }
+ Here is the caller graph for this function:

◆ getOpenPlaceHolder()

ilPageObjectGUI::getOpenPlaceHolder ( )

Definition at line 652 of file class.ilPageObjectGUI.php.

References $open_place_holder.

Referenced by showPage().

652  : string
653  {
655  }
+ Here is the caller graph for this function:

◆ getOutputMode()

◆ getPageConfig()

ilPageObjectGUI::getPageConfig ( )

◆ getPageObject()

ilPageObjectGUI::getPageObject ( )

Definition at line 380 of file class.ilPageObjectGUI.php.

References $obj.

Referenced by ilMediaPoolPageGUI\__construct(), ilTermDefinitionEditorGUI\__construct(), ilLMPageGUI\__construct(), ilPortfolioPageGUI\__construct(), ilWikiPageGUI\__construct(), __construct(), ilDclDetailedViewDefinitionGUI\activate(), activatePage(), ilWikiPageGUI\activateWikiPageRating(), ilWikiPageGUI\addHeaderAction(), addResourcesToTemplate(), ilContainerPageGUI\afterDeleteContents(), ilWikiPageGUI\blockWikiPage(), checkLangPageAvailable(), compareVersion(), ilWikiPageGUI\confirmWikiPageDeletion(), ilWikiPageGUI\createPageTranslation(), createPageTranslation(), ilDclDetailedViewDefinitionGUI\deactivate(), deactivatePage(), ilWikiPageGUI\deactivateWikiPageRating(), ilWikiPageGUI\deleteWikiPageConfirmationScreen(), displayMedia(), download_paragraph(), downloadFile(), ilContainerPageGUI\edit(), ilDclDetailedViewDefinitionGUI\executeCommand(), ilTestExpressPageObjectGUI\executeCommand(), ilWikiPageGUI\executeCommand(), ilPortfolioPageGUI\executeCommand(), executeCommand(), ilLMPageGUI\finishEditing(), getActivationFormValues(), getBlockingInfoMessage(), ilPCDataTableEditorGUI\getCellInfo(), ilPortfolioPageGUI\getCommentsHTMLExport(), ilWikiPageGUI\getCommentsHTMLExport(), ilPCSectionEditorGUI\getCreationForm(), ilWikiPageGUI\getCurrentLanguage(), ilPCLayoutTemplateEditorGUI\getEditComponentForm(), ilPCGridEditorGUI\getEditComponentForm(), ilPCPlaceHolderEditorGUI\getEditComponentForm(), ilPCSectionEditorGUI\getEditComponentForm(), ilPCDataTableEditorGUI\getEditComponentForm(), ilPCMediaObjectEditorGUI\getEditorElements(), ilPCSourceCodeEditorGUI\getEditorElements(), ilPCTabsEditorGUI\getEditorElements(), ilPCResourcesEditorGUI\getEditorElements(), ilPCDataTableEditorGUI\getEditorElements(), ilPortfolioPageGUI\getPageContentUserId(), ilPCInteractiveImageEditorGUI\getRenderedCreationForm(), ilPCSourceCodeEditorGUI\getRenderedImportForm(), ilPCSourceCodeEditorGUI\getRenderedManualForm(), ILIAS\COPage\PC\Paragraph\ParagraphResponseFactory\getResponseObject(), ILIAS\COPage\PC\Paragraph\ParagraphResponseFactory\getResponseObjectMulti(), ilWikiPageGUI\hideAdvancedMetaData(), history(), ilBlogPostingGUI\initDateForm(), initEditing(), ilWikiPageGUI\initRenameForm(), ilBlogPostingGUI\initTitleForm(), ilWikiPageGUI\insertWikiLinkAC(), ilLMPageGUI\onFeedbackEditingForwarding(), ilImprintGUI\postOutputProcessing(), ilDclDetailedViewDefinitionGUI\postOutputProcessing(), ilWikiPageGUI\postOutputProcessing(), ilWikiPageGUI\preview(), ilWikiPageGUI\printViewOrderList(), releasePageLock(), ilWikiPageGUI\renamePage(), ilWikiPageGUI\renameWikiPage(), saveActivation(), ilWikiPageGUI\searchWikiLinkAC(), ILIAS\COPage\Editor\Server\UIWrapper\sendPage(), ILIAS\COPage\PC\Table\TableCommandActionHandler\sendTable(), ILIAS\COPage\PC\Table\TableCommandActionHandler\sendUpdateResponse(), ilBlogPostingGUI\setBlogPosting(), ilMediaPoolPageGUI\setMediaPoolPage(), ilWikiPageGUI\setWikiPage(), showEditLockInfo(), ilPortfolioTemplatePageGUI\showPage(), ilDclDetailedViewDefinitionGUI\showPage(), ilPortfolioPageGUI\showPage(), showPage(), switchToLanguage(), ilWikiPageGUI\unblockWikiPage(), ilWikiPageGUI\unhideAdvancedMetaData(), ilBlogPostingGUI\updateDate(), and ilBlogPostingGUI\updateTitle().

380  : ilPageObject
381  {
382  return $this->obj;
383  }
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
+ Here is the caller graph for this function:

◆ getPagePermaLink()

ilPageObjectGUI::getPagePermaLink ( )

Definition at line 3175 of file class.ilPageObjectGUI.php.

Referenced by showPage().

3175  : string
3176  {
3177  return "";
3178  }
+ Here is the caller graph for this function:

◆ getParentType()

ilPageObjectGUI::getParentType ( )

Definition at line 311 of file class.ilPageObjectGUI.php.

References $parent_type.

Referenced by checkLangPageAvailable(), ilWikiPageGUI\createPageTranslation(), createPageTranslation(), executeCommand(), history(), initEditing(), and initPageObject().

311  : string
312  {
313  return $this->parent_type;
314  }
+ Here is the caller graph for this function:

◆ getPrependingHtml()

ilPageObjectGUI::getPrependingHtml ( )

Definition at line 667 of file class.ilPageObjectGUI.php.

References $prependinghtml.

Referenced by showPage().

667  : string
668  {
669  return $this->prependinghtml;
670  }
+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilPageObjectGUI::getPresentationTitle ( )

Definition at line 414 of file class.ilPageObjectGUI.php.

References $presentation_title.

Referenced by compareVersion(), ilAssQuestionPageGUI\showPage(), and showPage().

414  : string
415  {
417  }
+ Here is the caller graph for this function:

◆ getProfileBackUrl()

ilPageObjectGUI::getProfileBackUrl ( )

Definition at line 2110 of file class.ilPageObjectGUI.php.

References $profile_back_url, ILIAS\Repository\ctrl(), and getOutputMode().

Referenced by setDefaultLinkXml(), and showPage().

2110  : string
2111  {
2112  if ($this->profile_back_url != "") {
2113  return $this->profile_back_url;
2114  }
2115  if ($this->getOutputMode() === self::OFFLINE ||
2116  $this->getOutputMode() === self::PRINTING) {
2117  return "";
2118  }
2119  return $this->ctrl->getLinkTargetByClass(strtolower(get_class($this)), "preview");
2120  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionHTML()

ilPageObjectGUI::getQuestionHTML ( )

Definition at line 464 of file class.ilPageObjectGUI.php.

References getPageConfig().

464  : array
465  {
466  return $this->getPageConfig()->getQuestionHTML();
467  }
+ Here is the call graph for this function:

◆ getRawPageContent()

ilPageObjectGUI::getRawPageContent ( )

Definition at line 690 of file class.ilPageObjectGUI.php.

References $rawpagecontent.

Referenced by ilMediaPoolPageGUI\showPage(), and showPage().

690  : bool
691  {
692  return $this->rawpagecontent;
693  }
+ Here is the caller graph for this function:

◆ getRenderPageContainer()

ilPageObjectGUI::getRenderPageContainer ( )

Definition at line 736 of file class.ilPageObjectGUI.php.

References $render_page_container.

Referenced by ilAssQuestionPageGUI\isPageContainerToBeRendered(), and isPageContainerToBeRendered().

736  : bool
737  {
739  }
+ Here is the caller graph for this function:

◆ getSourcecodeDownloadScript()

ilPageObjectGUI::getSourcecodeDownloadScript ( )

Definition at line 489 of file class.ilPageObjectGUI.php.

References $sourcecode_download_script.

489  : string
490  {
492  }

◆ getStyleId()

ilPageObjectGUI::getStyleId ( )

◆ getTabs()

ilPageObjectGUI::getTabs ( string  $a_activate = "")

Definition at line 2719 of file class.ilPageObjectGUI.php.

References $lm_set, ILIAS\Repository\ctrl(), getEditPreview(), getEnabledTabs(), getOutputMode(), and setScreenIdComponent().

Referenced by executeCommand(), and getHTML().

2719  : void
2720  {
2721  if (in_array($this->getOutputMode(), [self::OFFLINE])) {
2722  return;
2723  }
2724  $this->setScreenIdComponent();
2725 
2726  if (!$this->getEnabledTabs()) {
2727  return;
2728  }
2729 
2730  // back to upper context
2731  if (!$this->getEditPreview()) {
2732  $this->tabs_gui->addTarget("pg", $this->ctrl->getLinkTarget($this, "preview"), array("", "preview"));
2733  } else {
2734  $this->tabs_gui->addTarget("cont_preview", $this->ctrl->getLinkTarget($this, "preview"), array("", "preview"));
2735  }
2736 
2737  if ($this->use_meta_data) {
2738  $mdgui = new ilObjectMetaDataGUI(
2739  $this->meta_data_rep_obj,
2740  $this->meta_data_type,
2741  $this->meta_data_sub_obj_id
2742  );
2743  $mdtab = $mdgui->getTab();
2744  if ($mdtab) {
2745  $this->tabs_gui->addTarget(
2746  "meta_data",
2747  $mdtab,
2748  "",
2749  "ilobjectmetadatagui"
2750  );
2751  }
2752  }
2753 
2754  $lm_set = new ilSetting("lm");
2755 
2756  // external hook to add tabs
2757  if (is_array($this->tab_hook)) {
2758  $func = $this->tab_hook["func"];
2759  $this->tab_hook["obj"]->$func();
2760  }
2761  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$lm_set
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplateOutputVar()

ilPageObjectGUI::getTemplateOutputVar ( )

Definition at line 479 of file class.ilPageObjectGUI.php.

References $template_output_var.

Referenced by showPage().

479  : string
480  {
482  }
+ Here is the caller graph for this function:

◆ getTemplateTargetVar()

ilPageObjectGUI::getTemplateTargetVar ( )

Definition at line 474 of file class.ilPageObjectGUI.php.

References $target_var.

Referenced by showPage().

474  : string
475  {
476  return $this->target_var;
477  }
+ Here is the caller graph for this function:

◆ getTinyMenu()

static ilPageObjectGUI::getTinyMenu ( string  $a_par_type,
bool  $a_int_links = false,
bool  $a_wiki_links = false,
bool  $a_keywords = false,
  $a_style_id = 0,
  $a_paragraph_styles = true,
  $a_save_return = true,
  $a_anchors = false,
  $a_save_new = true,
  $a_user_links = false,
\ILIAS\COPage\Editor\Server\UIWrapper  $ui_wrapper = null 
)
static

Get Tiny Menu.

Definition at line 1731 of file class.ilPageObjectGUI.php.

References Vendor\Package\$b, Vendor\Package\$c, $DIC, Vendor\Package\$f, ILIAS\LTI\ToolProvider\$key, ilPCListGUI\_getListCharacteristics(), ilTooltipGUI\addTooltip(), ilUtil\getImagePath(), ilCtrl\getLinkTargetByClass(), ilLanguage\loadLanguageModule(), ilPageEditorSettings\lookupSettingByParentType(), and ilLanguage\txt().

Referenced by ilPCParagraphEditorGUI\getEditorElements().

1743  : string {
1744  global $DIC;
1745 
1746  $lng = $DIC->language();
1747  $lng->loadLanguageModule("copg");
1748  $ctrl = $DIC->ctrl();
1749  $ui = $DIC->ui();
1750 
1751  $style_service = $DIC->contentStyle()->internal();
1752  $style_access_manager = $style_service->domain()->access(
1753  0,
1754  $DIC->user()->getId()
1755  );
1756  $char_manager = $style_service->domain()->characteristic(
1757  $a_style_id,
1758  $style_access_manager
1759  );
1760 
1761  $aset = new ilSetting("adve");
1762 
1763  $f = static function (string $type, string $code) use ($char_manager, $lng): string {
1764  $title = $char_manager->getPresentationTitle("text_inline", $type);
1765  if ($title === $type) {
1766  $title = $lng->txt("cont_char_style_" . $code);
1767  }
1768  return $title;
1769  };
1770 
1771  // character styles
1772  $chars = [];
1773  if ($a_style_id === 0) {
1774  $chars = array(
1775  "Comment" => array("code" => "com", "txt" => $f("Comment", "com")),
1776  "Quotation" => array("code" => "quot", "txt" => $f("Quotation", "quot")),
1777  "Accent" => array("code" => "acc", "txt" => $f("Accent", "acc")),
1778  "Code" => array("code" => "code", "txt" => $f("Code", "code"))
1779  );
1780  }
1781  foreach (ilPCParagraphGUI::_getTextCharacteristics($a_style_id, true) as $c) {
1782  if (in_array($c, ["Strong", "Important", "Emph"])) {
1783  continue;
1784  }
1785  if (!isset($chars[$c])) {
1786  $title = $char_manager->getPresentationTitle("text_inline", $c);
1787  switch ($c) {
1788  case "CodeInline":
1789  $chars["Code"] = array("code" => "code", "txt" => $f("Code", "code"));
1790  break;
1791  case "Comment":
1792  $chars["Comment"] = array("code" => "com", "txt" => $f("Comment", "com"));
1793  break;
1794  case "Quotation":
1795  $chars["Quotation"] = array("code" => "quot", "txt" => $f("Quotation", "quot"));
1796  break;
1797  case "Accent":
1798  $chars["Accent"] = array("code" => "acc", "txt" => $f("Accent", "acc"));
1799  break;
1800  default:
1801  $chars[$c] = array("code" => "", "txt" => $title);
1802  break;
1803  }
1804  }
1805  }
1806  $char_formats = [];
1807  foreach ($chars as $key => $char) {
1809  $a_par_type,
1810  "active_" . $char["code"],
1811  true
1812  )) {
1813  $t = "text_inline";
1814  $tag = "span";
1815  switch ($key) {
1816  case "Code": $tag = "code";
1817  break;
1818  }
1819  $html = '<' . $tag . ' class="ilc_' . $t . '_' . $key . '" style="font-size:90%; margin-top:2px; margin-bottom:2px; position:static;">' . $char["txt"] . "</" . $tag . ">";
1820  $char_formats[] = ["text" => $html, "action" => "selection.format", "data" => ["format" => $key]];
1821  }
1822  }
1823 
1824 
1825  $numbered_list = $ui->renderer()->render(
1826  $ui->factory()->symbol()->glyph()->numberedlist(null)
1827  );
1828 
1829  $bullet_list = $ui->renderer()->render(
1830  $ui->factory()->symbol()->glyph()->bulletlist(null)
1831  );
1832 
1833  $indent = $ui->renderer()->render(
1834  $ui->factory()->symbol()->glyph()->listindent(null)
1835  );
1836 
1837  $outdent = $ui->renderer()->render(
1838  $ui->factory()->symbol()->glyph()->listoutdent(null)
1839  );
1840 
1841  // menu
1842  $str = "str";
1843  $emp = "emp";
1844  $imp = "imp";
1845  if ($aset->get("use_physical")) {
1846  $str = "B";
1847  $emp = "I";
1848  $imp = "U";
1849  }
1850  $c_formats = [];
1851  foreach (["str", "emp", "imp", "sup", "sub"] as $c) {
1853  $a_par_type,
1854  "active_" . $c,
1855  true
1856  )) {
1857  switch ($c) {
1858  case "str":
1859  $c_formats[] = ["text" => '<span class="ilc_text_inline_Strong">' . $str . '</span>',
1860  "action" => "selection.format",
1861  "data" => ["format" => "Strong"],
1862  "aria-label" => $lng->txt("cont_text_str")
1863  ];
1864  break;
1865  case "emp":
1866  $c_formats[] = ["text" => '<span class="ilc_text_inline_Emph">' . $emp . '</span>',
1867  "action" => "selection.format",
1868  "data" => ["format" => "Emph"],
1869  "aria-label" => $lng->txt("cont_text_emp")
1870  ];
1871  break;
1872  case "imp":
1873  $c_formats[] = ["text" => '<span class="ilc_text_inline_Important">' . $imp . '</span>',
1874  "action" => "selection.format",
1875  "data" => ["format" => "Important"],
1876  "aria-label" => $lng->txt("cont_text_imp")
1877  ];
1878  break;
1879  case "sup":
1880  $c_formats[] = ["text" => 'x<sup>2</sup>',
1881  "action" => "selection.format",
1882  "data" => ["format" => "Sup"],
1883  "aria-label" => $lng->txt("cont_text_sup")
1884  ];
1885  break;
1886  case "sub":
1887  $c_formats[] = ["text" => 'x<sub>2</sub>',
1888  "action" => "selection.format",
1889  "data" => ["format" => "Sub"],
1890  "aria-label" => $lng->txt("cont_text_sub")
1891  ];
1892  break;
1893  }
1894  }
1895  }
1896  $c_formats[] = ["text" => "<i>A</i>",
1897  "action" => $char_formats,
1898  "aria-label" => $lng->txt("copg_more_character_formats")
1899  ];
1900  $c_formats[] = ["text" => '<i><strong><u>T</u></strong><sub>x</sub></i>',
1901  "action" => "selection.removeFormat",
1902  "data" => [],
1903  "aria-label" => $lng->txt("copg_remove_formats")
1904  ];
1905  $menu = [
1906  "cont_char_format" => $c_formats,
1907  "cont_lists" => [
1908  [
1909  "text" => $bullet_list,
1910  "action" => "list.bullet",
1911  "data" => [],
1912  "aria-label" => $lng->txt("cont_bullet_list")
1913  ],
1914  [
1915  "text" => $numbered_list,
1916  "action" => "list.number",
1917  "data" => [],
1918  "aria-label" => $lng->txt("cont_numbered_list")
1919  ],
1920  [
1921  "text" => $outdent,
1922  "action" => "list.outdent",
1923  "data" => [],
1924  "aria-label" => $lng->txt("cont_list_outdent")
1925  ],
1926  [
1927  "text" => $indent,
1928  "action" => "list.indent",
1929  "data" => [],
1930  "aria-label" => $lng->txt("cont_list_indent")
1931  ]
1932  ]
1933  ];
1934 
1935  // bullet lists
1936  $ulists = ilPCListGUI::_getListCharacteristics($a_style_id, "list_u");
1937  $olists = ilPCListGUI::_getListCharacteristics($a_style_id, "list_o");
1938  $ilists = ilPCListGUI::_getListCharacteristics($a_style_id, "list_item");
1939  if (count($ulists) > 1) {
1940  $la = [];
1941  foreach ($ulists as $c) {
1942  $la[] = ["action" => "list.bulletStyle", "text" => $c, "data" => ["format" => $c]];
1943  }
1944  $menu["copg_list_styles"][] = ["text" => $lng->txt("copg_list_style"), "action" => $la];
1945  }
1946  if (count($olists) > 1) {
1947  $la = [];
1948  foreach ($olists as $c) {
1949  $la[] = ["action" => "list.numberStyle", "text" => $c, "data" => ["format" => $c]];
1950  }
1951  $menu["copg_list_styles"][] = ["text" => $lng->txt("copg_list_style"), "action" => $la];
1952  }
1953  if (count($ilists) > 1) {
1954  $la = [];
1955  foreach ($ilists as $c) {
1956  $la[] = ["action" => "list.itemStyle", "text" => $c, "data" => ["format" => $c]];
1957  }
1958  $menu["copg_list_styles"][] = ["text" => $lng->txt("copg_list_item_style"), "action" => $la];
1959  }
1960 
1961  // more...
1962 
1963  // links
1964  $links = [];
1965  if ($a_wiki_links) {
1966  $links[] = ["text" => $lng->txt("cont_wiki_link_dialog"), "action" => "link.wikiSelection", "data" => [
1967  "url" => $ctrl->getLinkTargetByClass("ilwikipagegui", "")]];
1968  $links[] = ["text" => "[[" . $lng->txt("cont_wiki_page") . "]]", "action" => "link.wiki", "data" => []];
1969  }
1970  if ($a_int_links) {
1971  $links[] = ["text" => $lng->txt("cont_text_iln_link"), "action" => "link.internal", "data" => []];
1972  }
1974  $a_par_type,
1975  "active_xln",
1976  true
1977  )) {
1978  $links[] = ["text" => $lng->txt("cont_text_xln"), "action" => "link.external", "data" => []];
1979  }
1980  if ($a_user_links) {
1981  $links[] = ["text" => $lng->txt("cont_link_user"), "action" => "link.user", "data" => []];
1982  }
1983 
1984 
1985  // more
1986  $menu["cont_more_functions"] = [];
1987  $menu["cont_more_functions"][] = ["text" => $lng->txt("cont_link") . '<i class="mce-ico mce-i-link"></i>', "action" => $links];
1988 
1989  if ($a_keywords) {
1990  $menu["cont_more_functions"][] = ["text" => $lng->txt("cont_keyword"), "action" => "selection.keyword", "data" => []];
1991  }
1992  $mathJaxSetting = new ilSetting("MathJax");
1994  $a_par_type,
1995  "active_tex",
1996  true
1997  )) {
1998  if ($mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
1999  $menu["cont_more_functions"][] = ["text" => 'Tex', "action" => "selection.tex", "data" => []];
2000  }
2001  }
2003  $a_par_type,
2004  "active_fn",
2005  true
2006  )) {
2007  $menu["cont_more_functions"][] = ["text" => $lng->txt("cont_footnote"), "action" => "selection.fn", "data" => []];
2008  }
2009  if ($a_anchors) {
2010  $menu["cont_more_functions"][] = ["text" => $lng->txt("cont_anchor"), "action" => "selection.anchor", "data" => []];
2011  }
2012 
2013  $btpl = new ilTemplate("tpl.tiny_menu.html", true, true, "Services/COPage");
2014 
2015  foreach ($menu as $section_title => $section) {
2016  foreach ($section as $item) {
2017  if (is_array($item["action"])) {
2018  $buttons = [];
2019  foreach ($item["action"] as $i) {
2020  $buttons[] = $ui_wrapper->getButton(
2021  $i["text"],
2022  "par-action",
2023  $i["action"],
2024  $i["data"],
2025  "",
2026  false,
2027  $i["aria-label"] ?? ""
2028  );
2029  }
2030  $dd = $ui->factory()->dropdown()->standard($buttons)->withLabel($item["text"])
2031  ->withAriaLabel($item["aria-label"] ?? "");
2032  $btpl->setCurrentBlock("button");
2033  $btpl->setVariable("BUTTON", $ui->renderer()->renderAsync($dd));
2034  } else {
2035  $b = $ui_wrapper->getRenderedButton(
2036  $item["text"],
2037  "par-action",
2038  $item["action"],
2039  $item["data"],
2040  "",
2041  false,
2042  $item["aria-label"] ?? ""
2043  );
2044  $btpl->setCurrentBlock("button");
2045  $btpl->setVariable("BUTTON", $b);
2046  }
2047  $btpl->parseCurrentBlock();
2048  }
2049  $btpl->setCurrentBlock("section");
2050  $btpl->setVariable("TXT_SECTION", $lng->txt($section_title));
2051  $btpl->parseCurrentBlock();
2052  }
2053 
2054 
2055  if ($a_paragraph_styles) {
2056  $sel = new \ParagraphStyleSelector($ui_wrapper, $a_style_id);
2057  $dd = $sel->getStyleSelector(" ");
2058  $btpl->setCurrentBlock("par_edit");
2059  $btpl->setVariable("TXT_PAR_FORMAT", $lng->txt("cont_par_format"));
2060 
2061  $btpl->setVariable("STYLE_SELECTOR", $ui->renderer()->render($dd));
2062 
2063  $btpl->parseCurrentBlock();
2064  }
2065 
2066  // block styles
2067  $sel = new \SectionStyleSelector($ui_wrapper, $a_style_id);
2068  $dd = $sel->getStyleSelector(" ", $type = "par-action", $action = "sec.class", $attr = "class", true);
2069  $btpl->setVariable("TXT_BLOCK", $lng->txt("cont_sur_block_format"));
2070  $btpl->setVariable("BLOCK_STYLE_SELECTOR", $ui->renderer()->render($dd));
2071 
2072 
2073  $btpl->setVariable("TINY_HEADER", $lng->txt("cont_text_editing"));
2074  $btpl->setVariable(
2075  "SPLIT_BUTTON",
2076  $ui_wrapper->getRenderedButton($lng->txt("cont_quit_text_editing"), "par-action", "save.return")
2077  );
2078 
2079  /*
2080  $btpl->setVariable(
2081  "CANCEL_BUTTON",
2082  $ui_wrapper->getRenderedButton($lng->txt("cancel"), "par-action", "component.cancel")
2083  );*/
2084 
2085  $btpl->setVariable("TXT_SAVING", $lng->txt("cont_saving"));
2086  $btpl->setVariable("SRC_LOADER", \ilUtil::getImagePath("media/loader.svg"));
2088  "ilAdvSelListAnchorElement_char_style_selection",
2089  $lng->txt("cont_more_character_styles"),
2090  "iltinymenu_bd"
2091  );
2092 
2093  return $btpl->get();
2094  }
ILIAS DI UIServices $ui
static lookupSettingByParentType(string $a_par_type, string $a_name, string $a_default='0')
Lookup setting by parent type.
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _getListCharacteristics(int $a_style_id, string $type)
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
string $key
Consumer key/client ID value.
Definition: System.php:193
static addTooltip(string $a_el_id, string $a_text, string $a_container="", string $a_my="bottom center", string $a_at="top center", bool $a_use_htmlspecialchars=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getViewPageLink()

ilPageObjectGUI::getViewPageLink ( )

Definition at line 573 of file class.ilPageObjectGUI.php.

References $view_page_link.

Referenced by executeCommand().

573  : string
574  {
575  return $this->view_page_link;
576  }
+ Here is the caller graph for this function:

◆ getViewPageTarget()

ilPageObjectGUI::getViewPageTarget ( )

Definition at line 578 of file class.ilPageObjectGUI.php.

References $view_page_target.

Referenced by executeCommand().

578  : string
579  {
581  }
+ Here is the caller graph for this function:

◆ getViewPageText()

ilPageObjectGUI::getViewPageText ( )

Definition at line 583 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\lng().

Referenced by executeCommand().

583  : string
584  {
585  return $this->lng->txt("cont_presentation_view");
586  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ history()

ilPageObjectGUI::history ( )

Get history table as HTML.

Definition at line 2616 of file class.ilPageObjectGUI.php.

References getEnableEditing(), getId(), getPageObject(), getParentType(), and setBackToEditTabs().

2616  : string
2617  {
2618  if (!$this->getEnableEditing()) {
2619  return "";
2620  }
2621 
2622  $this->setBackToEditTabs();
2623 
2624  $this->tpl->addJavaScript("./Services/COPage/js/page_history.js");
2625 
2626  $table_gui = new ilPageHistoryTableGUI($this, "history");
2627  $table_gui->setId("hist_table");
2628  $entries = $this->getPageObject()->getHistoryEntries();
2629  $entries[] = array('page_id' => $this->getPageObject()->getId(),
2630  'parent_type' => $this->getPageObject()->getParentType(),
2631  'hdate' => $this->getPageObject()->getLastChange(),
2632  'parent_id' => $this->getPageObject()->getParentId(),
2633  'nr' => 0,
2634  'sortkey' => 999999,
2635  'user' => $this->getPageObject()->last_change_user);
2636  $table_gui->setData($entries);
2637  return $table_gui->getHTML();
2638  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ initActivationForm()

ilPageObjectGUI::initActivationForm ( )

Init activation form.

Definition at line 2845 of file class.ilPageObjectGUI.php.

References ilRadioOption\addSubItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setRequired().

Referenced by editActivation(), and saveActivation().

2845  : void
2846  {
2847  $this->form = new ilPropertyFormGUI();
2848  $this->form->setFormAction($this->ctrl->getFormAction($this));
2849  $this->form->setTitle($this->lng->txt("cont_page_activation"));
2850 
2851  // activation type radio
2852  $rad = new ilRadioGroupInputGUI($this->lng->txt("cont_activation"), "activation");
2853  $rad_op1 = new ilRadioOption($this->lng->txt("cont_activated"), "activated");
2854 
2855  $rad->addOption($rad_op1);
2856  $rad_op2 = new ilRadioOption($this->lng->txt("cont_deactivated"), "deactivated");
2857  $rad->addOption($rad_op2);
2858  $rad_op3 = new ilRadioOption($this->lng->txt("cont_scheduled_activation"), "scheduled");
2859 
2860  $dt_prop = new ilDateTimeInputGUI($this->lng->txt("cont_start"), "start");
2861  $dt_prop->setRequired(true);
2862  $dt_prop->setShowTime(true);
2863  $rad_op3->addSubItem($dt_prop);
2864  $dt_prop2 = new ilDateTimeInputGUI($this->lng->txt("cont_end"), "end");
2865  $dt_prop2->setRequired(true);
2866  $dt_prop2->setShowTime(true);
2867  $rad_op3->addSubItem($dt_prop2);
2868 
2869  // show activation information
2870  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_show_activation_info"), "show_activation_info");
2871  $cb->setInfo($this->lng->txt("cont_show_activation_info_info"));
2872  $rad_op3->addSubItem($cb);
2873 
2874 
2875  $rad->addOption($rad_op3);
2876 
2877  $this->form->addCommandButton("saveActivation", $this->lng->txt("save"));
2878 
2879  $this->form->addItem($rad);
2880  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a date/time property in a property form.
This class represents a property in a property form.
setRequired(bool $a_required)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditing()

ilPageObjectGUI::initEditing ( )
protected

Definition at line 2411 of file class.ilPageObjectGUI.php.

References ilObject\_lookupType(), ILIAS\Repository\ctrl(), getEnableEditing(), getPageObject(), getParentType(), ILIAS\Repository\help(), ilCalendarUtil\initDateTimePicker(), ilModalGUI\initJS(), ILIAS\Repository\lng(), setEditorToolContext(), setScreenIdComponent(), and showEditLockInfo().

Referenced by showPage().

2411  : void
2412  {
2413  // editing allowed?
2414  if (!$this->getEnableEditing()) {
2415  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
2416  $this->ctrl->redirect($this, "preview");
2417  }
2418 
2419  // not so nive workaround for container pages, bug #0015831
2420  $ptype = $this->getParentType();
2421  if ($ptype == "cont" && $this->requested_ref_id > 0) {
2422  $ptype = ilObject::_lookupType($this->requested_ref_id, true);
2423  }
2424  $this->setScreenIdComponent();
2425  $this->help->setScreenId("edit_" . $ptype);
2426 
2427  // edit lock
2428  if (!$this->getPageObject()->getEditLock()) {
2429  $this->showEditLockInfo();
2430  return;
2431  } else {
2432  $this->setEditorToolContext();
2433  }
2434 
2435  $this->lng->toJS("paste");
2436  $this->lng->toJS("delete");
2437  $this->lng->toJS("cont_delete_content");
2438  $this->lng->toJS("copg_confirm_el_deletion");
2439  $this->lng->toJS("cont_saving");
2440  $this->lng->toJS("cont_ed_par");
2441  $this->lng->toJS("cont_no_block");
2442  $this->lng->toJS("copg_error");
2443  $this->lng->toJS("cont_ed_click_to_add_pg");
2444  $this->lng->toJS("cont_ed_new_item_after");
2445  $this->lng->toJS("cont_ed_new_item_before");
2446  $this->lng->toJS("cont_ed_item_up");
2447  $this->lng->toJS("cont_ed_item_down");
2448  $this->lng->toJS("cont_ed_delete_item");
2449  $this->lng->toJS("copg_edit_iframe_title");
2450  $this->lng->toJS("copg_par_format_selection");
2451  // workaroun: we need this js for the new editor version, e.g. for new section form to work
2452  // @todo: solve this in a smarter way
2453  $this->tpl->addJavaScript("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
2456  }
setEditorToolContext()
Set editor tool context.
static initJS(ilGlobalTemplateInterface $a_main_tpl=null)
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initialOpenedContent()

ilPageObjectGUI::initialOpenedContent ( )

Initially opened content.

Definition at line 3038 of file class.ilPageObjectGUI.php.

References ilPropertyFormGUI\getHTML(), and initOpenedContentForm().

3038  : void
3039  {
3040  $this->tabs_gui->activateTab("edit");
3041  $form = $this->initOpenedContentForm();
3042  $this->tpl->setContent($form->getHTML());
3043  }
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ initOpenedContentForm()

ilPageObjectGUI::initOpenedContentForm ( )

Definition at line 3045 of file class.ilPageObjectGUI.php.

References $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ilLinkInputGUI\INT, ILIAS\Repository\lng(), ilLinkInputGUI\setAllowedLinkTypes(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by executeCommand(), and initialOpenedContent().

3046  {
3047  $form = new ilPropertyFormGUI();
3048 
3049  // link input
3050  $ac = new ilLinkInputGUI($this->lng->txt('cont_resource'), 'opened_content');
3052  $ac->setInternalLinkDefault("Media_Media", 0);
3053  $ac->setInternalLinkFilterTypes(array("PageObject_FAQ", "GlossaryItem", "Media_Media", "Media_FAQ"));
3054  $val = $this->obj->getInitialOpenedContent();
3055  if (($val["id"] ?? '') != "" && ($val["type"] ?? '') != "") {
3056  $ac->setValue($val["type"] . "|" . $val["id"] . "|" . $val["target"]);
3057  }
3058 
3059  $form->addItem($ac);
3060 
3061  $form->addCommandButton("saveInitialOpenedContent", $this->lng->txt("save"));
3062  $form->addCommandButton("edit", $this->lng->txt("cancel"));
3063  $form->setTitle($this->lng->txt("cont_initial_attached_content"));
3064  $form->setFormAction($this->ctrl->getFormAction($this));
3065 
3066  return $form;
3067  }
setAllowedLinkTypes(string $a_val)
Set allowed link types (LIST, BOTH, INT, EXT)
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
ilPropertyFormGUI $form
This class represents a external and/or internal link in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPageObject()

ilPageObjectGUI::initPageObject ( )
finalprotected

Init page object.

Definition at line 294 of file class.ilPageObjectGUI.php.

References getId(), ilPageObjectFactory\getInstance(), getLanguage(), getOldNr(), getParentType(), and setPageObject().

Referenced by __construct().

294  : void
295  {
297  $this->getParentType(),
298  $this->getId(),
299  $this->getOldNr(),
300  $this->getLanguage()
301  );
302  $page->setConcreteLang($this->concrete_lang);
303  $this->setPageObject($page);
304  }
setPageObject(ilPageObject $a_pg_obj)
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertAdvTrigger()

ilPageObjectGUI::insertAdvTrigger ( string  $a_output)

Insert adv content trigger.

Definition at line 2339 of file class.ilPageObjectGUI.php.

References getAbstractOnly(), and ILIAS\Repository\lng().

Referenced by showPage().

2339  : string
2340  {
2341  if (!$this->getAbstractOnly()) {
2342  $a_output = str_replace(
2343  "{{{{{LV_show_adv}}}}}",
2344  $this->lng->txt("cont_show_adv"),
2345  $a_output
2346  );
2347  $a_output = str_replace(
2348  "{{{{{LV_hide_adv}}}}}",
2349  $this->lng->txt("cont_hide_adv"),
2350  $a_output
2351  );
2352  } else {
2353  $a_output = str_replace(
2354  "{{{{{LV_show_adv}}}}}",
2355  "",
2356  $a_output
2357  );
2358  $a_output = str_replace(
2359  "{{{{{LV_hide_adv}}}}}",
2360  "",
2361  $a_output
2362  );
2363  }
2364 
2365  return $a_output;
2366  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertJSAtPlaceholder()

ilPageObjectGUI::insertJSAtPlaceholder ( )

Definition at line 2509 of file class.ilPageObjectGUI.php.

References edit(), and setOpenPlaceHolder().

2509  : string
2510  {
2511  $pl_pc_id = $this->request->getPlaceholderPCId();
2512  $this->obj->buildDom();
2513  $this->obj->addHierIDs();
2514  $this->setOpenPlaceHolder($pl_pc_id);
2515  return $this->edit();
2516  }
setOpenPlaceHolder(string $a_val)
+ Here is the call graph for this function:

◆ insertPageToc()

ilPageObjectGUI::insertPageToc ( string  $a_output)

Definition at line 2214 of file class.ilPageObjectGUI.php.

References ilGlobalTemplateInterface\get(), ILIAS\Repository\int(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setVariable(), and ILIAS\Repository\ui().

Referenced by showPage().

2214  : string
2215  {
2216  // extract all headings
2217  $offsets = [];
2218  $cpos = 0;
2219  while (is_int($pos = strpos($a_output, "ilPageTocH", $cpos))) {
2220  $offsets[] = $pos;
2221  $cpos = $pos + 1;
2222  }
2223 
2224  $page_heads = array();
2225  foreach ($offsets as $os) {
2226  $level = (int) substr($a_output, $os + 10, 1);
2227  if (in_array($level, array(1,2,3))) {
2228  $anchor = str_replace(
2229  "TocH",
2230  "TocA",
2231  substr($a_output, $os, strpos($a_output, "-->", $os) - $os)
2232  );
2233 
2234  // get heading
2235  $tag_start = stripos($a_output, "<h" . $level . " ", $os);
2236  $tag_end = stripos($a_output, "</h" . $level . ">", $tag_start);
2237  $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2238 
2239  // get headings text
2240  $text_start = stripos($head, ">") + 1;
2241  $text_end = strripos($head, "<!--", $text_start);
2242  $text = substr($head, $text_start, $text_end - $text_start);
2243  $page_heads[] = array("level" => $level, "text" => $text,
2244  "anchor" => $anchor);
2245  }
2246  }
2247  if (count($page_heads) > 1) {
2248  $listing = $this->gui->listing();
2249  // todo: inject?
2250  /*$list->setListClass("ilc_page_toc_PageTOCList");
2251  $list->setItemClass("ilc_page_toc_PageTOCItem");*/
2252  $i = 0;
2253  $c_depth = 1;
2254  $c_par[1] = 0;
2255  $c_par[2] = 0;
2256  $page_toc_ph = "<!--PageTocPH-->";
2257  foreach ($page_heads as $ind => $h) {
2258  $i++;
2259  $par = 0;
2260 
2261  // check if we have a parent for one level up
2262  $par = 0;
2263  if ($h["level"] == 2 && $c_par[1] > 0) {
2264  $par = $c_par[1];
2265  }
2266  if ($h["level"] == 3 && $c_par[2] > 0) {
2267  $par = $c_par[2];
2268  }
2269 
2270  $h["text"] = str_replace($page_toc_ph, "", $h["text"]);
2271 
2272  $listing->node(
2273  $this->ui->factory()->legacy("<a href='#" . $h["anchor"] . "' class='ilc_page_toc_PageTOCLink'>" . $h["text"] . "</a>"),
2274  (string) $i,
2275  (string) ($par)
2276  );
2277 
2278  // set the node as current parent of the level
2279  if ($h["level"] == 1) {
2280  $c_par[1] = $i;
2281  $c_par[2] = 0;
2282  }
2283  if ($h["level"] == 2) {
2284  $c_par[2] = $i;
2285  }
2286  }
2287 
2288  $tpl = new ilTemplate(
2289  "tpl.page_toc.html",
2290  true,
2291  true,
2292  "Services/COPage"
2293  );
2294  $tpl->setVariable("PAGE_TOC", $listing->autoNumbers(true)->render());
2295  $tpl->setVariable("TXT_PAGE_TOC", $this->lng->txt("cont_page_toc"));
2296  $tpl->setVariable("TXT_HIDE", $this->lng->txt("hide"));
2297  $tpl->setVariable("TXT_SHOW", $this->lng->txt("show"));
2298 
2299  $a_output = str_replace(
2300  "{{{{{PageTOC}}}}}",
2301  $tpl->get(),
2302  $a_output
2303  );
2304  $numbers = $listing->getNumbers();
2305 
2306  if (count($numbers) > 0) {
2307  foreach ($numbers as $n) {
2308  $a_output = (strpos($a_output, $page_toc_ph) !== false)
2309  ? substr_replace($a_output, $n . " ", strpos($a_output, $page_toc_ph), strlen($page_toc_ph))
2310  : $a_output;
2311  }
2312  }
2313  } else {
2314  $a_output = str_replace(
2315  "{{{{{PageTOC}}}}}",
2316  "",
2317  $a_output
2318  );
2319  }
2320 
2321  return $a_output;
2322  }
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertResources()

ilPageObjectGUI::insertResources ( string  $a_output)

Definition at line 2324 of file class.ilPageObjectGUI.php.

References getEnablePCType(), getOutputMode(), and ilPCResourcesGUI\insertResourcesIntoPageContent().

Referenced by showPage().

2324  : string
2325  {
2326  // this is edit mode only
2327  if ($this->getEnablePCType("Resources") &&
2328  ($this->getOutputMode() == "edit" || $this->getOutputMode() == "preview")) {
2329  $a_output = ilPCResourcesGUI::insertResourcesIntoPageContent($a_output);
2330  }
2331  return $a_output;
2332  }
static insertResourcesIntoPageContent(string $a_content)
Insert resources (see also ilContainerContentGUI::determinePageEmbeddedBlocks for presentation) ...
getEnablePCType(string $a_pc_type)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isEnabledChangeComments()

ilPageObjectGUI::isEnabledChangeComments ( )

Definition at line 534 of file class.ilPageObjectGUI.php.

References $change_comments.

Referenced by showPage().

534  : bool
535  {
536  return $this->change_comments;
537  }
+ Here is the caller graph for this function:

◆ isEnabledNotes()

ilPageObjectGUI::isEnabledNotes ( )

Definition at line 545 of file class.ilPageObjectGUI.php.

References $notes_enabled.

Referenced by edit().

545  : bool
546  {
547  return $this->notes_enabled;
548  }
+ Here is the caller graph for this function:

◆ isPageContainerToBeRendered()

ilPageObjectGUI::isPageContainerToBeRendered ( )
protected

Definition at line 3168 of file class.ilPageObjectGUI.php.

References getOutputMode(), getPageConfig(), and getRenderPageContainer().

Referenced by showPage().

3168  : bool
3169  {
3170  return (
3171  $this->getRenderPageContainer() || ($this->getOutputMode() == self::PREVIEW && $this->getPageConfig()->getUsePageContainer())
3172  );
3173  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onFeedbackEditingForwarding()

ilPageObjectGUI::onFeedbackEditingForwarding ( )

Definition at line 1022 of file class.ilPageObjectGUI.php.

Referenced by executeCommand().

1022  : void
1023  {
1024  }
+ Here is the caller graph for this function:

◆ outputToTemplate()

ilPageObjectGUI::outputToTemplate ( )

Definition at line 404 of file class.ilPageObjectGUI.php.

References $output2template.

Referenced by showPage().

404  : bool
405  {
406  return $this->output2template;
407  }
+ Here is the caller graph for this function:

◆ postOutputProcessing()

ilPageObjectGUI::postOutputProcessing ( string  $a_output)

Finalizing output processing.

Maybe overwritten in derived classes, e.g. in wiki module.

Definition at line 2373 of file class.ilPageObjectGUI.php.

Referenced by showPage().

2373  : string
2374  {
2375  return $a_output;
2376  }
+ Here is the caller graph for this function:

◆ presentation()

ilPageObjectGUI::presentation ( string  $a_mode = self::PRESENTATION)

Definition at line 2518 of file class.ilPageObjectGUI.php.

References setOutputMode(), and showPage().

2518  : string
2519  {
2520  $this->setOutputMode($a_mode);
2521 
2522  return $this->showPage();
2523  }
setOutputMode(string $a_mode=self::PRESENTATION)
showPage()
display content of page
+ Here is the call graph for this function:

◆ preview()

ilPageObjectGUI::preview ( )

Definition at line 2387 of file class.ilPageObjectGUI.php.

References setBackToHistoryTabs(), setOutputMode(), and showPage().

Referenced by ilBlogPostingGUI\previewEmbedded(), ilBlogPostingGUI\previewFullscreen(), and previewHistory().

2387  : string
2388  {
2389  if ($this->requested_history_mode) {
2390  $this->setBackToHistoryTabs();
2391  } else {
2392  $this->tabs_gui->activateTab("cont_preview");
2393  }
2394  $this->setOutputMode(self::PREVIEW);
2395  return $this->showPage();
2396  }
setOutputMode(string $a_mode=self::PRESENTATION)
showPage()
display content of page
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ previewHistory()

ilPageObjectGUI::previewHistory ( )

Preview history.

Definition at line 2382 of file class.ilPageObjectGUI.php.

References preview().

2382  : void
2383  {
2384  $this->preview();
2385  }
+ Here is the call graph for this function:

◆ processAnswer()

ilPageObjectGUI::processAnswer ( )

Process answer.

Definition at line 3019 of file class.ilPageObjectGUI.php.

References ilPageQuestionProcessor\saveQuestionAnswer().

3019  : void
3020  {
3022  $this->request->getString("type"),
3023  $this->request->getString("id"),
3024  $this->request->getString("answer")
3025  );
3026  }
static saveQuestionAnswer(string $a_type, int $a_id, string $a_answer)
+ Here is the call graph for this function:

◆ releasePageLock()

ilPageObjectGUI::releasePageLock ( )

Release page lock.

Definition at line 3156 of file class.ilPageObjectGUI.php.

References finishEditing(), getPageObject(), and ILIAS\Repository\lng().

3156  : void
3157  {
3158  $this->getPageObject()->releasePageLock();
3159  $this->tpl->setOnScreenMessage('success', $this->lng->txt("cont_page_lock_released"), true);
3160  $this->finishEditing();
3161  }
+ Here is the call graph for this function:

◆ replaceCurlyBrackets()

ilPageObjectGUI::replaceCurlyBrackets ( string  $output)

Definition at line 1664 of file class.ilPageObjectGUI.php.

Referenced by showPage().

1664  : string
1665  {
1666  //echo "<br><br>".htmlentities($output);
1667 
1668  while (is_int($start = strpos($output, "<!--ParStart-->")) &&
1669  is_int($end = strpos($output, "<!--ParEnd-->", $start))) {
1670  $output = substr($output, 0, $start) .
1671  str_replace(
1672  array("{","}"),
1673  array("&#123;","&#125;"),
1674  substr($output, $start + 15, $end - ($start + 15))
1675  ) .
1676  substr($output, $end + 13);
1677  }
1678 
1679  // $output = str_replace("{", "&#123;", $output);
1680  // $output = str_replace("}", "&#125;", $output);
1681  //echo "<br><br>".htmlentities($output);
1682  return $output;
1683  }
+ Here is the caller graph for this function:

◆ replaceDiffTags()

ilPageObjectGUI::replaceDiffTags ( string  $a_html)

Definition at line 2818 of file class.ilPageObjectGUI.php.

Referenced by compareVersion().

2818  : string
2819  {
2820  $a_html = str_replace("[ilDiffInsStart]", '<span class="ilDiffIns">', $a_html);
2821  $a_html = str_replace("[ilDiffDelStart]", '<span class="ilDiffDel">', $a_html);
2822  $a_html = str_replace("[ilDiffInsEnd]", '</span>', $a_html);
2823  $a_html = str_replace("[ilDiffDelEnd]", '</span>', $a_html);
2824 
2825  return $a_html;
2826  }
+ Here is the caller graph for this function:

◆ rollback()

ilPageObjectGUI::rollback ( )

Rollback to a previous version.

Definition at line 2672 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and getEnableEditing().

2672  : void
2673  {
2674  if (!$this->getEnableEditing()) {
2675  return;
2676  }
2677 
2678  $hentry = $this->obj->getHistoryEntry(
2679  $this->request->getString("rollback_nr")
2680  );
2681 
2682  if ($hentry["content"] != "") {
2683  $this->obj->setXMLContent($hentry["content"]);
2684  $this->obj->buildDom(true);
2685  if ($this->obj->update()) {
2686  $this->ctrl->redirect($this, "history");
2687  }
2688  }
2689  $this->ctrl->redirect($this, "history");
2690  }
+ Here is the call graph for this function:

◆ rollbackConfirmation()

ilPageObjectGUI::rollbackConfirmation ( )

Rollback confirmation.

Definition at line 2643 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), getEnableEditing(), IL_CAL_DATETIME, and ILIAS\Repository\lng().

2643  : void
2644  {
2645  if (!$this->getEnableEditing()) {
2646  return;
2647  }
2648 
2649  $c_gui = new ilConfirmationGUI();
2650 
2651  // set confirm/cancel commands
2652  $this->ctrl->setParameter($this, "rollback_nr", $this->requested_old_nr);
2653  $c_gui->setFormAction($this->ctrl->getFormAction($this, "rollback"));
2654  $c_gui->setHeaderText($this->lng->txt("cont_rollback_confirmation"));
2655  $c_gui->setCancel($this->lng->txt("cancel"), "history");
2656  $c_gui->setConfirm($this->lng->txt("confirm"), "rollback");
2657 
2658  $hentry = $this->obj->getHistoryEntry($this->requested_old_nr);
2659 
2660  $c_gui->addItem(
2661  "id[]",
2662  $this->requested_old_nr,
2664  );
2665 
2666  $this->tpl->setContent($c_gui->getHTML());
2667  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
+ Here is the call graph for this function:

◆ saveActivation()

ilPageObjectGUI::saveActivation ( )

Save Activation.

Definition at line 2916 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\form(), getPageObject(), IL_CAL_DATETIME, initActivationForm(), and ILIAS\Repository\lng().

2916  : void
2917  {
2918  $this->initActivationForm();
2919 
2920  if ($this->form->checkInput()) {
2921  $this->getPageObject()->setActive(true);
2922  $this->getPageObject()->setActivationStart(null);
2923  $this->getPageObject()->setActivationEnd(null);
2924  $this->getPageObject()->setShowActivationInfo(
2925  $this->request->getString("show_activation_info")
2926  );
2927  $activation = $this->request->getString("activation");
2928  if ($activation == "deactivated") {
2929  $this->getPageObject()->setActive(false);
2930  }
2931  if ($activation == "scheduled") {
2932  $this->getPageObject()->setActive(false);
2933  $this->getPageObject()->setActivationStart(
2934  $this->form->getItemByPostVar("start")->getDate()->get(IL_CAL_DATETIME)
2935  );
2936  $this->getPageObject()->setActivationEnd(
2937  $this->form->getItemByPostVar("end")->getDate()->get(IL_CAL_DATETIME)
2938  );
2939  }
2940  $this->getPageObject()->update();
2941  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
2942  $this->ctrl->redirect($this, "editActivation");
2943  }
2944  $this->form->setValuesByPost();
2945  $this->tpl->setContent($this->form->getHTML());
2946  }
initActivationForm()
Init activation form.
const IL_CAL_DATETIME
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveInitialOpenedContent()

ilPageObjectGUI::saveInitialOpenedContent ( )

Definition at line 3069 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

3069  : void
3070  {
3071  $this->obj->saveInitialOpenedContent(
3072  $this->request->getString("opened_content_ajax_type"),
3073  $this->request->getInt("opened_content_ajax_id"),
3074  $this->request->getString("opened_content_ajax_target")
3075  );
3076 
3077  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"));
3078  $this->ctrl->redirect($this, "edit");
3079  }
+ Here is the call graph for this function:

◆ setAbstractOnly()

ilPageObjectGUI::setAbstractOnly ( bool  $a_val,
string  $pcid = "" 
)

Get only abstract (first text paragraph)

Definition at line 718 of file class.ilPageObjectGUI.php.

Referenced by ILIAS\COPage\PC\Paragraph\ParagraphResponseFactory\getResponseObjectMulti().

721  : void {
722  $this->abstract_only = $a_val;
723  $this->abstract_pcid = $pcid;
724  }
+ Here is the caller graph for this function:

◆ setActivationListener()

ilPageObjectGUI::setActivationListener ( object  $a_obj,
string  $a_meth 
)

Definition at line 588 of file class.ilPageObjectGUI.php.

591  : void {
592  $this->act_obj = $a_obj;
593  $this->act_meth = $a_meth;
594  }

◆ setAdvMdRecordObject()

ilPageObjectGUI::setAdvMdRecordObject ( int  $a_adv_ref_id,
string  $a_adv_type,
string  $a_adv_subtype = "-" 
)

Set object, that defines the adv md records being used.

Default is $this->object, but the context may set another object (e.g. media pool for media objects)

Definition at line 270 of file class.ilPageObjectGUI.php.

Referenced by ilObjMediaPoolGUI\executeCommand().

274  : void {
275  $this->adv_ref_id = $a_adv_ref_id;
276  $this->adv_type = $a_adv_type;
277  $this->adv_subtype = $a_adv_subtype;
278  }
+ Here is the caller graph for this function:

◆ setBackToEditTabs()

ilPageObjectGUI::setBackToEditTabs ( )
protected

Definition at line 2595 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by editActivation(), executeCommand(), and history().

2595  : void
2596  {
2597  $this->tabs_gui->clearTargets();
2598  $this->tabs_gui->setBackTarget(
2599  $this->lng->txt("back"),
2600  $this->ctrl->getLinkTarget($this, "edit")
2601  );
2602  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBackToHistoryTabs()

ilPageObjectGUI::setBackToHistoryTabs ( )
protected

Definition at line 2604 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by compareVersion(), and preview().

2604  : void
2605  {
2606  $this->tabs_gui->clearTargets();
2607  $this->tabs_gui->setBackTarget(
2608  $this->lng->txt("back"),
2609  $this->ctrl->getLinkTarget($this, "history")
2610  );
2611  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCompareMode()

ilPageObjectGUI::setCompareMode ( bool  $a_val)

Definition at line 705 of file class.ilPageObjectGUI.php.

Referenced by compareVersion().

705  : void
706  {
707  $this->compare_mode = $a_val;
708  }
+ Here is the caller graph for this function:

◆ setDefaultLinkXml()

ilPageObjectGUI::setDefaultLinkXml ( )

Definition at line 2096 of file class.ilPageObjectGUI.php.

References getOutputMode(), getProfileBackUrl(), and setLinkXml().

Referenced by ilForumPageGUI\finishEditing(), ilContentPagePageGUI\getProfileBackUrl(), ILIAS\COPage\PC\Paragraph\ParagraphResponseFactory\getResponseObject(), ILIAS\COPage\Editor\Server\UIWrapper\sendPage(), and showPage().

2096  : void
2097  {
2098  $this->page_linker->setProfileBackUrl($this->getProfileBackUrl());
2099  $this->page_linker->setOffline($this->getOutputMode() == self::OFFLINE);
2100  $this->setLinkXml($this->page_linker->getLinkXML($this->getPageObject()->getInternalLinks()));
2101  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditMode()

ilPageObjectGUI::setEditMode ( )

Set edit mode.

Definition at line 1697 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), and ILIAS\Repository\user().

1697  : void
1698  {
1699  $media_mode = $this->request->getString("media_mode");
1700  $html_mode = $this->request->getString("html_mode");
1701  $js_mode = $this->request->getString("js_mode");
1702  if ($media_mode != "") {
1703  if ($media_mode == "disable") {
1704  $this->user->writePref("ilPageEditor_MediaMode", "disable");
1705  } else {
1706  $this->user->writePref("ilPageEditor_MediaMode", "");
1707  }
1708  }
1709  if ($html_mode != "") {
1710  if ($html_mode == "disable") {
1711  $this->user->writePref("ilPageEditor_HTMLMode", "disable");
1712  } else {
1713  $this->user->writePref("ilPageEditor_HTMLMode", "");
1714  }
1715  }
1716  if ($js_mode != "") {
1717  if ($js_mode == "disable") {
1718  $this->user->writePref("ilPageEditor_JavaScript", "disable");
1719  } else {
1720  $this->user->writePref("ilPageEditor_JavaScript", "");
1721  }
1722  }
1723 
1724  $this->ctrl->redirect($this, "edit");
1725  }
+ Here is the call graph for this function:

◆ setEditorToolContext()

ilPageObjectGUI::setEditorToolContext ( )
protected

Set editor tool context.

Definition at line 2401 of file class.ilPageObjectGUI.php.

References ilCOPageEditGSToolProvider\SHOW_EDITOR.

Referenced by executeCommand(), and initEditing().

2401  : void
2402  {
2403  $collection = $this->tool_context->current()->getAdditionalData();
2404  if ($collection->exists(ilCOPageEditGSToolProvider::SHOW_EDITOR)) {
2405  $collection->replace(ilCOPageEditGSToolProvider::SHOW_EDITOR, true);
2406  } else {
2407  $collection->add(ilCOPageEditGSToolProvider::SHOW_EDITOR, true);
2408  }
2409  }
+ Here is the caller graph for this function:

◆ setEditPreview()

ilPageObjectGUI::setEditPreview ( bool  $a_editpreview)

Set Display first Edit tab, then Preview tab, instead of Page and Edit.

Definition at line 621 of file class.ilPageObjectGUI.php.

Referenced by ilMediaPoolPageGUI\__construct(), ilTermDefinitionEditorGUI\__construct(), ilLMPageObjectGUI\editLayout(), ilLMPageObjectGUI\executeCommand(), ilAssQuestionPageCommandForwarder\forward(), ilObjQuestionPoolGUI\getQueryParamInt(), and ilAssQuestionPreviewGUI\populateSolutionOutput().

623  : void {
624  $this->editpreview = $a_editpreview;
625  }
+ Here is the caller graph for this function:

◆ setEnabledHref()

ilPageObjectGUI::setEnabledHref ( bool  $enable)

Definition at line 751 of file class.ilPageObjectGUI.php.

Referenced by ILIAS\COPage\PC\Paragraph\ParagraphResponseFactory\getResponseObjectMulti().

751  : void
752  {
753  $this->enabled_href = $enable;
754  }
+ Here is the caller graph for this function:

◆ setEnabledNews()

ilPageObjectGUI::setEnabledNews ( bool  $a_enabled,
int  $a_news_obj_id = 0,
string  $a_news_obj_type = "" 
)

Definition at line 596 of file class.ilPageObjectGUI.php.

600  : void {
601  $this->enabled_news = $a_enabled;
602  $this->news_obj_id = $a_news_obj_id;
603  $this->news_obj_type = $a_news_obj_type;
604  }

◆ setEnabledPageFocus()

ilPageObjectGUI::setEnabledPageFocus ( bool  $a_enabledpagefocus)

Definition at line 642 of file class.ilPageObjectGUI.php.

Referenced by ilAssQuestionPageGUI\__construct(), and __construct().

642  : void
643  {
644  $this->enabledpagefocus = $a_enabledpagefocus;
645  }
+ Here is the caller graph for this function:

◆ setEnabledTabs()

ilPageObjectGUI::setEnabledTabs ( bool  $a_enabledtabs)

Definition at line 632 of file class.ilPageObjectGUI.php.

632  : void
633  {
634  $this->tabs_enabled = $a_enabledtabs;
635  }

◆ setEnableEditing()

ilPageObjectGUI::setEnableEditing ( bool  $a_enableediting)

Definition at line 672 of file class.ilPageObjectGUI.php.

Referenced by ilBlogPostingGUI\__construct().

672  : void
673  {
674  $this->enableediting = $a_enableediting;
675  }
+ Here is the caller graph for this function:

◆ setEnablePCType()

ilPageObjectGUI::setEnablePCType ( string  $a_pc_type,
bool  $a_val 
)

Definition at line 353 of file class.ilPageObjectGUI.php.

References getPageConfig().

356  : void {
357  $this->getPageConfig()->setEnablePCType($a_pc_type, $a_val);
358  }
+ Here is the call graph for this function:

◆ setFileDownloadLink()

ilPageObjectGUI::setFileDownloadLink ( string  $a_download_link)

Definition at line 504 of file class.ilPageObjectGUI.php.

Referenced by ilAssGenFeedbackPageGUI\__construct(), ilAssSpecFeedbackPageGUI\__construct(), ilAssQuestionPageGUI\__construct(), ilGlossaryPresentationGUI\basicPageGuiInit(), and ilLMPresentationGUI\basicPageGuiInit().

504  : void
505  {
506  $this->file_download_link = $a_download_link;
507  }
+ Here is the caller graph for this function:

◆ setFullscreenLink()

ilPageObjectGUI::setFullscreenLink ( string  $a_fullscreen_link)

Definition at line 514 of file class.ilPageObjectGUI.php.

Referenced by ilGlossaryPresentationGUI\basicPageGuiInit(), and ilLMPresentationGUI\basicPageGuiInit().

514  : void
515  {
516  $this->fullscreen_link = $a_fullscreen_link;
517  }
+ Here is the caller graph for this function:

◆ setHeader()

ilPageObjectGUI::setHeader ( string  $a_title = "")

Definition at line 419 of file class.ilPageObjectGUI.php.

References ILIAS\UI\examples\Symbol\Glyph\Header\header().

419  : void
420  {
421  $this->header = $a_title;
422  }
+ Here is the call graph for this function:

◆ setId()

ilPageObjectGUI::setId ( int  $a_val)

Definition at line 316 of file class.ilPageObjectGUI.php.

Referenced by __construct().

316  : void
317  {
318  $this->id = $a_val;
319  }
+ Here is the caller graph for this function:

◆ setIntLinkReturn()

ilPageObjectGUI::setIntLinkReturn ( string  $a_return)

Definition at line 524 of file class.ilPageObjectGUI.php.

524  : void
525  {
526  $this->int_link_return = $a_return;
527  }

◆ setLanguage()

ilPageObjectGUI::setLanguage ( string  $a_val)

Definition at line 339 of file class.ilPageObjectGUI.php.

References ILIAS\UI\examples\Symbol\Glyph\Language\language().

Referenced by __construct().

339  : void
340  {
341  $this->language = $a_val;
342  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLinkFrame()

ilPageObjectGUI::setLinkFrame ( string  $l_frame = "")

Definition at line 439 of file class.ilPageObjectGUI.php.

439  : void
440  {
441  $this->link_frame = $l_frame;
442  }

◆ setLinkParams()

ilPageObjectGUI::setLinkParams ( string  $l_params = "")

Definition at line 429 of file class.ilPageObjectGUI.php.

429  : void
430  {
431  $this->link_params = $l_params;
432  }

◆ setLinkXml()

ilPageObjectGUI::setLinkXml ( string  $xml)

Definition at line 2103 of file class.ilPageObjectGUI.php.

Referenced by ilForumPageGUI\finishEditing(), ilContentPagePageGUI\getProfileBackUrl(), ilMediaPoolPageGUI\getRawContent(), and setDefaultLinkXml().

2103  : void
2104  {
2105  $this->link_xml = $xml;
2106  $this->link_xml_set = true;
2107  }
+ Here is the caller graph for this function:

◆ setOfflineDirectory()

ilPageObjectGUI::setOfflineDirectory ( string  $offdir)
Parameters
string$offdircontains diretory where to store files

Definition at line 553 of file class.ilPageObjectGUI.php.

Referenced by ilGlossaryPresentationGUI\basicPageGuiInit(), and ilLMPresentationGUI\basicPageGuiInit().

553  : void
554  {
555  $this->offline_directory = $offdir;
556  }
+ Here is the caller graph for this function:

◆ setOldNr()

ilPageObjectGUI::setOldNr ( int  $a_val)

Set old nr (historic page)

Definition at line 329 of file class.ilPageObjectGUI.php.

Referenced by __construct().

329  : void
330  {
331  $this->old_nr = $a_val;
332  }
+ Here is the caller graph for this function:

◆ setOpenPlaceHolder()

ilPageObjectGUI::setOpenPlaceHolder ( string  $a_val)

Definition at line 647 of file class.ilPageObjectGUI.php.

Referenced by insertJSAtPlaceholder().

647  : void
648  {
649  $this->open_place_holder = $a_val;
650  }
+ Here is the caller graph for this function:

◆ setOutputMode()

ilPageObjectGUI::setOutputMode ( string  $a_mode = self::PRESENTATION)

◆ setPageBackTitle()

ilPageObjectGUI::setPageBackTitle ( string  $a_title)

Definition at line 499 of file class.ilPageObjectGUI.php.

499  : void
500  {
501  $this->page_back_title = $a_title;
502  }

◆ setPageConfig()

ilPageObjectGUI::setPageConfig ( ilPageConfig  $a_val)

Definition at line 365 of file class.ilPageObjectGUI.php.

Referenced by __construct(), and ilAssQuestionPageGUI\showPage().

365  : void
366  {
367  $this->page_config = $a_val;
368  }
+ Here is the caller graph for this function:

◆ setPageLinker()

ilPageObjectGUI::setPageLinker ( \ILIAS\COPage\PageLinker  $page_linker)

Definition at line 449 of file class.ilPageObjectGUI.php.

References $page_linker.

449  : void
450  {
451  $this->page_linker = $page_linker;
452  }
ILIAS COPage PageLinker $page_linker

◆ setPageObject()

ilPageObjectGUI::setPageObject ( ilPageObject  $a_pg_obj)

Definition at line 375 of file class.ilPageObjectGUI.php.

Referenced by compareVersion(), initPageObject(), ilBlogPostingGUI\setBlogPosting(), ilMediaPoolPageGUI\setMediaPoolPage(), and ilWikiPageGUI\setWikiPage().

375  : void
376  {
377  $this->obj = $a_pg_obj;
378  }
+ Here is the caller graph for this function:

◆ setParentType()

ilPageObjectGUI::setParentType ( string  $a_val)

Definition at line 306 of file class.ilPageObjectGUI.php.

Referenced by __construct().

306  : void
307  {
308  $this->parent_type = $a_val;
309  }
+ Here is the caller graph for this function:

◆ setPrependingHtml()

ilPageObjectGUI::setPrependingHtml ( string  $a_prependinghtml)

Definition at line 662 of file class.ilPageObjectGUI.php.

Referenced by ilDclDetailedViewDefinitionGUI\showPage().

662  : void
663  {
664  $this->prependinghtml = $a_prependinghtml;
665  }
+ Here is the caller graph for this function:

◆ setPresentationTitle()

ilPageObjectGUI::setPresentationTitle ( string  $a_title = "")

◆ setProfileBackUrl()

ilPageObjectGUI::setProfileBackUrl ( string  $url)

Definition at line 2122 of file class.ilPageObjectGUI.php.

References $url.

2122  : void
2123  {
2124  $this->profile_back_url = $url;
2125  }
$url
Definition: ltiregstart.php:35

◆ setQEditTabs()

ilPageObjectGUI::setQEditTabs ( string  $a_active)

Set question editing tabs.

Definition at line 996 of file class.ilPageObjectGUI.php.

References ilAssQuestionFeedbackEditingGUI\CMD_SHOW, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

Referenced by executeCommand().

996  : void
997  {
998  $this->tabs_gui->clearTargets();
999 
1000  $this->tabs_gui->setBackTarget(
1001  $this->lng->txt("back"),
1002  $this->ctrl->getLinkTarget($this, "edit")
1003  );
1004 
1005  $this->ctrl->setParameterByClass("ilquestioneditgui", "q_id", $this->requested_q_id);
1006  $this->tabs_gui->addTab(
1007  "question",
1008  $this->lng->txt("question"),
1009  $this->ctrl->getLinkTargetByClass("ilquestioneditgui", "editQuestion")
1010  );
1011 
1012  $this->ctrl->setParameterByClass("ilAssQuestionFeedbackEditingGUI", "q_id", $this->requested_q_id);
1013  $this->tabs_gui->addTab(
1014  "feedback",
1015  $this->lng->txt("feedback"),
1016  $this->ctrl->getLinkTargetByClass("ilAssQuestionFeedbackEditingGUI", ilAssQuestionFeedbackEditingGUI::CMD_SHOW)
1017  );
1018 
1019  $this->tabs_gui->activateTab($a_active);
1020  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setQuestionHTML()

ilPageObjectGUI::setQuestionHTML ( array  $question_html)

Definition at line 459 of file class.ilPageObjectGUI.php.

References getPageConfig().

Referenced by assQuestionGUI\getILIASPage().

459  : void
460  {
461  $this->getPageConfig()->setQuestionHTML($question_html);
462  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setRawPageContent()

ilPageObjectGUI::setRawPageContent ( bool  $a_rawpagecontent)

Set Get raw page content only.

Definition at line 685 of file class.ilPageObjectGUI.php.

Referenced by ilMediaPoolPageGUI\getRawContent(), ILIAS\COPage\PC\Paragraph\ParagraphResponseFactory\getResponseObjectMulti(), ilImprintGUI\renderFullscreen(), and ilWikiUtil\sendNotification().

685  : void
686  {
687  $this->rawpagecontent = $a_rawpagecontent;
688  }
+ Here is the caller graph for this function:

◆ setRenderPageContainer()

ilPageObjectGUI::setRenderPageContainer ( bool  $a_val)

Definition at line 731 of file class.ilPageObjectGUI.php.

Referenced by ilAssQuestionPreviewGUI\populateQuestionOutput(), ilWikiPageGUI\preview(), and ilTestCorrectionsGUI\showSolution().

731  : void
732  {
733  $this->render_page_container = $a_val;
734  }
+ Here is the caller graph for this function:

◆ setScreenIdComponent()

ilPageObjectGUI::setScreenIdComponent ( )

Definition at line 2692 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\help().

Referenced by getTabs(), and initEditing().

2692  : void
2693  {
2694  $this->help->setScreenIdComponent("copg");
2695  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSourcecodeDownloadScript()

ilPageObjectGUI::setSourcecodeDownloadScript ( string  $script_name)

Definition at line 484 of file class.ilPageObjectGUI.php.

Referenced by ilLMPresentationGUI\basicPageGuiInit().

484  : void
485  {
486  $this->sourcecode_download_script = $script_name;
487  }
+ Here is the caller graph for this function:

◆ setStyleId()

◆ setTabHook()

ilPageObjectGUI::setTabHook ( object  $a_object,
string  $a_function 
)

Definition at line 611 of file class.ilPageObjectGUI.php.

614  : void {
615  $this->tab_hook = array("obj" => $a_object, "func" => $a_function);
616  }

◆ setTabs()

ilPageObjectGUI::setTabs ( ilTabsGUI  $a_tabs)

Definition at line 494 of file class.ilPageObjectGUI.php.

494  : void
495  {
496  $this->tabs_gui = $a_tabs;
497  }

◆ setTemplate()

ilPageObjectGUI::setTemplate ( ilGlobalTemplateInterface  $main_tpl)

Definition at line 257 of file class.ilPageObjectGUI.php.

Referenced by ilGlossaryTermGUI\output().

257  : void
258  {
259  $this->tpl = $main_tpl;
260  }
+ Here is the caller graph for this function:

◆ setTemplateOutput()

ilPageObjectGUI::setTemplateOutput ( bool  $a_output = true)

◆ setTemplateTargetVar()

ilPageObjectGUI::setTemplateTargetVar ( string  $a_variable)

Definition at line 469 of file class.ilPageObjectGUI.php.

Referenced by ilContentPagePageGUI\__construct(), and ilForumPageGUI\__construct().

469  : void
470  {
471  $this->target_var = $a_variable;
472  }
+ Here is the caller graph for this function:

◆ setViewPageLink()

ilPageObjectGUI::setViewPageLink ( string  $a_link,
string  $a_target = "" 
)

set link for "view page" button

Definition at line 567 of file class.ilPageObjectGUI.php.

567  : void
568  {
569  $this->view_page_link = $a_link;
570  $this->view_page_target = $a_target;
571  }

◆ showEditLockInfo()

ilPageObjectGUI::showEditLockInfo ( )
protected

Definition at line 2458 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl(), exit, ilDatePresentation\formatDate(), ilUserUtil\getNamePresentation(), getPageObject(), IL_CAL_UNIX, ILIAS\Repository\lng(), and ILIAS\Repository\ui().

Referenced by initEditing().

2458  : void
2459  {
2460  $info = $this->lng->txt("content_no_edit_lock");
2461  $lock = $this->getPageObject()->getEditLockInfo();
2462  $info .= "</br>" . $this->lng->txt("content_until") . ": " .
2463  ilDatePresentation::formatDate(new ilDateTime($lock["edit_lock_until"], IL_CAL_UNIX));
2464  $info .= "</br>" . $this->lng->txt("obj_usr") . ": " .
2465  ilUserUtil::getNamePresentation($lock["edit_lock_user"]);
2466 
2467  $back_link = $this->ui->factory()->link()->standard(
2468  $this->lng->txt("back"),
2469  $this->ctrl->getLinkTarget($this, "finishEditing")
2470  );
2471 
2472  $mbox = $this->ui->factory()->messageBox()->info($info)
2473  ->withLinks([$back_link]);
2474  $rendered_mbox = $this->ui->renderer()->render($mbox);
2475 
2476  if (!$this->ctrl->isAsynch()) {
2477  $this->tpl->setContent($rendered_mbox);
2478  } else {
2479  echo $rendered_mbox;
2480  exit;
2481  }
2482  }
exit
Definition: login.php:29
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
const IL_CAL_UNIX
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showEditToolbar()

ilPageObjectGUI::showEditToolbar ( )
protected

Show edit toolbar.

Definition at line 1047 of file class.ilPageObjectGUI.php.

References Vendor\Package\$b, $lng, $ui, ILIAS\Repository\ctrl(), getEnableEditing(), ILIAS\Repository\toolbar(), and ilLanguage\txt().

Referenced by executeCommand(), and ilWikiPageGUI\preview().

1047  : void
1048  {
1049  $ui = $this->ui;
1050  $lng = $this->lng;
1051  if ($this->getEnableEditing()) {
1052  $b = $ui->factory()->button()->standard(
1053  $lng->txt("edit_page"),
1054  $this->ctrl->getLinkTarget($this, "edit")
1055  );
1056  $this->toolbar->addComponent($b);
1057  }
1058  }
ILIAS DI UIServices $ui
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showMediaFullscreen()

ilPageObjectGUI::showMediaFullscreen ( int  $a_style_id = 0)

show fullscreen view of media object

Definition at line 2534 of file class.ilPageObjectGUI.php.

References $params, $requested_pg_id, ilObject\_lookupTitle(), ilPageObjectFactory\getInstance(), ilUtil\getStyleSheetLocation(), ilFileUtils\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, and ilObjMediaObject\isTypeAllowed().

Referenced by ilObjQuestionPoolGUI\fullscreenObject(), and ilObjTestGUI\fullscreenObject().

2534  : void
2535  {
2536  $this->tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
2537  $this->tpl->setCurrentBlock("ContentStyle");
2538  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", 0);
2539  $this->tpl->parseCurrentBlock();
2540 
2541  $this->tpl->setVariable(
2542  "PAGETITLE",
2543  " - " . ilObject::_lookupTitle($this->request->getMobId())
2544  );
2545  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
2546  $this->tpl->setCurrentBlock("ilMedia");
2547 
2548  $media_obj = new ilObjMediaObject($this->request->getMobId());
2549  if ($this->requested_pg_id > 0) {
2550  $pg_obj = ilPageObjectFactory::getInstance($this->obj->getParentType(), $this->requested_pg_id);
2551  $pg_obj->buildDom();
2552 
2553  $xml = "<dummy>";
2554  // todo: we get always the first alias now (problem if mob is used multiple
2555  // times in page)
2556  $xml .= $pg_obj->getMediaAliasElement($this->request->getMobId());
2557  } else {
2558  $xml = "<dummy>";
2559  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
2560  }
2561  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
2562  $xml .= "</dummy>";
2563 
2564 
2565  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
2566  $mode = "fullscreen";
2567  $params = array('mode' => $mode,
2568  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
2569  'webspace_path' => $wb_path);
2570  $output = $this->xsl->process($xml, $params);
2571 
2572  // unmask user html
2573  $this->tpl->setVariable("MEDIA_CONTENT", $output);
2574  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static _lookupTitle(int $obj_id)
static isTypeAllowed(string $a_type)
const IL_MODE_ALIAS
const IL_MODE_OUTPUT
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPage()

ilPageObjectGUI::showPage ( )

display content of page

Definition at line 1063 of file class.ilPageObjectGUI.php.

References Vendor\Package\$e, $file_download_link, $fullscreen_link, $link_frame, $link_params, $params, $sourcecode_download_script, $tpl, ilObject\_exists(), ilInternalLink\_getTargetsOfSource(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilAccordionGUI\addCss(), ilAccordionGUI\addJavaScript(), addResourcesToTemplate(), ANONYMOUS_USER_ID, ilPCContentInclude\collectContentIncludes(), ILIAS\Repository\ctrl(), determineFileDownloadLink(), determineFullscreenLink(), determineSourcecodeDownloadScript(), displayValidationError(), exit, ilDatePresentation\formatDate(), ilLegacyFormElementsUtil\formSelect(), ilGlobalTemplateInterface\get(), getAbstractOnly(), ilEditClipboard\getAction(), ilObjStyleSheet\getBaseContentStylePath(), ilPCSection\getCacheTriggerString(), getCompareMode(), getComponentPluginsXML(), getDisabledText(), getEnabledHref(), getEnabledPageFocus(), getEnablePCType(), ilPlayerUtil\getFlashVideoPlayerFilename(), ilUtil\getImagePath(), ilInternalLinkGUI\getInitHTML(), ilMathJax\getInstance(), getLinkXML(), ilUserUtil\getNamePresentation(), getOpenPlaceHolder(), getOutputMode(), getPageConfig(), getPageObject(), getPagePermaLink(), getPrependingHtml(), getPresentationTitle(), getProfileBackUrl(), getRawPageContent(), getStyleId(), getTemplateOutputVar(), getTemplateTargetVar(), ilFileUtils\getWebspaceDir(), ilObjContentObject\hasSuccessorPage(), IL_CAL_DATETIME, ILIAS_VERSION, ilObjMediaObjectGUI\includePresentationJS(), initEditing(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), ilPlayerUtil\initMediaElementJs(), insertAdvTrigger(), insertPageToc(), insertResources(), ilMapUtil\isActivated(), isEnabledChangeComments(), isPageContainerToBeRendered(), ilObjMediaObject\isTypeAllowed(), ILIAS\Repository\lng(), ilMediaPoolPage\lookupTitle(), outputToTemplate(), ilGlobalTemplateInterface\parseCurrentBlock(), postOutputProcessing(), replaceCurlyBrackets(), ilPageConfig\SEC_PROTECT_PROTECTED, ilGlobalTemplateInterface\setCurrentBlock(), setDefaultLinkXml(), ilGlobalTemplateInterface\setVariable(), ilGlobalTemplateInterface\touchBlock(), and ILIAS\Repository\user().

Referenced by compareVersion(), edit(), getHTML(), ilMediaPoolPageGUI\getRawContent(), presentation(), ilImprintGUI\preview(), preview(), ilImprintGUI\renderFullscreen(), and ILIAS\COPage\Editor\Server\UIWrapper\sendPage().

1063  : string
1064  {
1065  $main_tpl = $this->tpl;
1066  $sn_arr = [];
1067 
1068  $sel_js_mode = '';
1069  $paragraph_plugin_string = '';
1070  $disable_auto_margins = '';
1071 
1072  // jquery and jquery ui are always provided for components
1075 
1076  // $this->initSelfAssessmentRendering();
1078 
1079  $main_tpl->addJavaScript("./Services/COPage/js/ilCOPagePres.js");
1080 
1081  // needed for overlays in iim
1082  ilOverlayGUI::initJavascript();
1083 
1085 
1086  // init template
1087  if ($this->getOutputMode() == "edit") {
1088  $this->initEditing();
1089  if (!$this->getPageObject()->getEditLock()) {
1090  return "";
1091  }
1092 
1093  $this->getPageObject()->buildDom();
1094 
1095  $this->log->debug("ilPageObjectGUI, showPage() in edit mode.");
1096 
1097  $tpl = new ilTemplate("tpl.page_edit_wysiwyg.html", true, true, "Services/COPage");
1098  // to do: status dependent class
1099  $tpl->setVariable("CLASS_PAGE_TD", "ilc_Page");
1100 
1101  // user comment
1102  if ($this->isEnabledChangeComments()) {
1103  $tpl->setCurrentBlock("change_comment");
1104  $tpl->setVariable("TXT_ADD_COMMENT", $this->lng->txt("cont_add_change_comment"));
1106  }
1107 
1108  if ($this->getPageConfig()->getUsePageContainer()) {
1109  $tpl->setVariable("PAGE_CONTAINER_CLASS", "ilc_page_cont_PageContainer");
1110  }
1111 
1112  $tpl->setVariable(
1113  "WYSIWYG_ACTION",
1114  $this->ctrl->getFormActionByClass("ilpageeditorgui", "", "", true)
1115  );
1116 
1117  // determine media, html and javascript mode
1118  $sel_js_mode = "enable";
1119 
1120  // show prepending html
1121  $tpl->setVariable("PREPENDING_HTML", $this->getPrependingHtml());
1122 
1123 
1124  // get js files for JS enabled editing
1125  if ($sel_js_mode == "enable") {
1126  // add int link parts
1127  $tpl->setCurrentBlock("int_link_prep");
1129  $this->ctrl->getLinkTargetByClass(
1130  array("ilpageeditorgui", "ilinternallinkgui"),
1131  "",
1132  false,
1133  true,
1134  false
1135  )
1136  ));
1138 
1139  $this->editor_gui->init()->initUI($main_tpl);
1140  }
1141  } else {
1142  // presentation or preview here
1143 
1144  $tpl = new ilTemplate("tpl.page.html", true, true, "Services/COPage");
1145  if ($this->getEnabledPageFocus()) {
1146  $tpl->touchBlock("page_focus");
1147  }
1148  // presentation
1149  if ($this->isPageContainerToBeRendered()) {
1150  $tpl->touchBlock("page_container_1");
1151  $tpl->touchBlock("page_container_2");
1152  $tpl->touchBlock("page_container_3");
1153  }
1154 
1155  // history
1156  $c_old_nr = $this->getPageObject()->old_nr;
1157  if ($c_old_nr > 0 || $this->getCompareMode() || ($this->requested_history_mode == 1)) {
1158  $hist_info =
1159  $this->getPageObject()->getHistoryInfo($c_old_nr);
1160 
1161  if (!$this->getCompareMode()) {
1162  $this->ctrl->setParameter($this, "history_mode", "1");
1163 
1164  // previous revision
1165  if (isset($hist_info["previous"])) {
1166  $tpl->setCurrentBlock("previous_rev");
1167  $tpl->setVariable("TXT_PREV_REV", $this->lng->txt("cont_previous_rev"));
1168  $this->ctrl->setParameter($this, "old_nr", $hist_info["previous"]["nr"]);
1169  $tpl->setVariable(
1170  "HREF_PREV",
1171  $this->ctrl->getLinkTarget($this, "preview")
1172  );
1173  } else {
1174  $tpl->setCurrentBlock("previous_rev_disabled");
1175  $tpl->setVariable("TXT_PREV_REV", $this->lng->txt("cont_previous_rev"));
1176  }
1178 
1179  // next revision
1180  if ($c_old_nr > 0) {
1181  $tpl->setCurrentBlock("next_rev");
1182  $tpl->setVariable("TXT_NEXT_REV", $this->lng->txt("cont_next_rev"));
1183  $this->ctrl->setParameter($this, "old_nr", $hist_info["next"]["nr"] ?? 0);
1184  $tpl->setVariable(
1185  "HREF_NEXT",
1186  $this->ctrl->getLinkTarget($this, "preview")
1187  );
1189 
1190  // latest revision
1191  $tpl->setCurrentBlock("latest_rev");
1192  $tpl->setVariable("TXT_LATEST_REV", $this->lng->txt("cont_latest_rev"));
1193  $this->ctrl->setParameter($this, "old_nr", "");
1194  $tpl->setVariable(
1195  "HREF_LATEST",
1196  $this->ctrl->getLinkTarget($this, "preview")
1197  );
1199  }
1200 
1201  $this->ctrl->setParameter($this, "history_mode", "");
1202 
1203  // rollback
1204  if ($c_old_nr > 0 && $this->user->getId() != ANONYMOUS_USER_ID) {
1205  $tpl->setCurrentBlock("rollback");
1206  $this->ctrl->setParameter($this, "old_nr", $c_old_nr);
1207  $tpl->setVariable(
1208  "HREF_ROLLBACK",
1209  $this->ctrl->getLinkTarget($this, "rollbackConfirmation")
1210  );
1211  $this->ctrl->setParameter($this, "old_nr", "");
1212  $tpl->setVariable(
1213  "TXT_ROLLBACK",
1214  $this->lng->txt("cont_rollback")
1215  );
1217  }
1218  }
1219 
1220  $tpl->setCurrentBlock("hist_nav");
1221  $tpl->setVariable("TXT_REVISION", $this->lng->txt("cont_revision"));
1222  $tpl->setVariable(
1223  "VAL_REVISION_DATE",
1224  ilDatePresentation::formatDate(new ilDateTime($hist_info["current"]["hdate"], IL_CAL_DATETIME))
1225  );
1226  $tpl->setVariable(
1227  "VAL_REV_USER",
1228  ilUserUtil::getNamePresentation($hist_info["current"]["user_id"])
1229  );
1231  }
1232  }
1233  if ($this->getOutputMode() != self::PRESENTATION &&
1234  $this->getOutputMode() != self::OFFLINE &&
1235  $this->getOutputMode() != self::PREVIEW &&
1236  $this->getOutputMode() != self::PRINTING) {
1237  $tpl->setVariable("FORMACTION", $this->ctrl->getFormActionByClass("ilpageeditorgui"));
1238  }
1239 
1240  // output media object edit list (of media links)
1241  if ($this->getOutputMode() == "edit") {
1243  $this->obj->getParentType() . ":pg",
1244  $this->obj->getId(),
1245  $this->obj->getLanguage()
1246  );
1247  $mob_links = array();
1248  foreach ($links as $link) {
1249  if ($link["type"] == "mob") {
1250  if (ilObject::_exists($link["id"]) && ilObject::_lookupType($link["id"]) == "mob") {
1251  $mob_links[$link["id"]] = ilObject::_lookupTitle($link["id"]) . " [" . $link["id"] . "]";
1252  }
1253  }
1254  }
1255 
1256  // linked media objects
1257  if (count($mob_links) > 0) {
1258  $tpl->setCurrentBlock("med_link");
1259  $tpl->setVariable("TXT_LINKED_MOBS", $this->lng->txt("cont_linked_mobs"));
1260  $tpl->setVariable(
1261  "SEL_MED_LINKS",
1262  ilLegacyFormElementsUtil::formSelect(0, "mob_id", $mob_links, false, true)
1263  );
1264  $tpl->setVariable("TXT_EDIT_MEDIA", $this->lng->txt("cont_edit_mob"));
1265  $tpl->setVariable("TXT_COPY_TO_CLIPBOARD", $this->lng->txt("cont_copy_to_clipboard"));
1266  //$this->tpl->setVariable("TXT_COPY_TO_POOL", $this->lng->txt("cont_copy_to_mediapool"));
1268  }
1269 
1270  // content snippets used
1271  $this->getPageObject()->buildDom();
1273  $this->getPageObject(),
1274  $this->getPageObject()->getDomDoc()
1275  );
1276  if (count($snippets) > 0) {
1277  foreach ($snippets as $s) {
1278  $sn_arr[$s["id"]] = ilMediaPoolPage::lookupTitle($s["id"]);
1279  }
1280  $tpl->setCurrentBlock("med_link");
1281  $tpl->setVariable("TXT_CONTENT_SNIPPETS_USED", $this->lng->txt("cont_snippets_used"));
1282  $tpl->setVariable(
1283  "SEL_SNIPPETS",
1284  ilLegacyFormElementsUtil::formSelect(0, "ci_id", $sn_arr, false, true)
1285  );
1286  $tpl->setVariable("TXT_SHOW_INFO", $this->lng->txt("cont_show_info"));
1288  }
1289 
1290  // scheduled activation?
1291  if (!$this->getPageObject()->getActive() &&
1292  $this->getPageObject()->getActivationStart() != "" &&
1293  $this->getPageConfig()->getEnableScheduledActivation()) {
1294  $tpl->setCurrentBlock("activation_txt");
1295  $tpl->setVariable("TXT_SCHEDULED_ACTIVATION", $this->lng->txt("cont_scheduled_activation"));
1296  $tpl->setVariable(
1297  "SA_FROM",
1299  new ilDateTime(
1300  $this->getPageObject()->getActivationStart(),
1302  )
1303  )
1304  );
1305  $tpl->setVariable(
1306  "SA_TO",
1308  new ilDateTime(
1309  $this->getPageObject()->getActivationEnd(),
1311  )
1312  )
1313  );
1315  }
1316  }
1317 
1318  // get content
1319  $builded = $this->obj->buildDom();
1320 
1321  // manage hierarchical ids
1322  if ($this->getOutputMode() == "edit") {
1323  // add pc ids, if necessary
1324  if (!$this->obj->checkPCIds()) {
1325  $this->obj->insertPCIds();
1326  $this->obj->update(true, true);
1327  }
1328 
1329  $this->obj->addFileSizes();
1330  $this->obj->addHierIDs();
1331  } else {
1332  $this->obj->addFileSizes();
1333  }
1334 
1335  //echo "<br>-".htmlentities($this->obj->getXMLContent())."-<br><br>"; exit;
1336  //echo "<br>-".htmlentities($this->getLinkXML())."-"; exit;
1337 
1338  // set default link xml, if nothing was set yet
1339  if (!$this->link_xml_set) {
1340  $this->setDefaultLinkXml();
1341  }
1342 
1343  $template_xml = '';
1344 
1345  $link_xml = $this->getLinkXML();
1346 
1347  // disable/enable auto margins
1348  if ($this->getStyleId() > 0) {
1349  if (ilObject::_lookupType($this->getStyleId()) == "sty") {
1350  $style = new ilObjStyleSheet($this->getStyleId());
1351  $template_xml = $style->getTemplateXML();
1352  $disable_auto_margins = "n";
1353  if ($style->lookupStyleSetting("disable_auto_margins")) {
1354  $disable_auto_margins = "y";
1355  }
1356  }
1357  }
1358 
1359  $append_footnotes = "y";
1360  if ($this->getAbstractOnly()) {
1361  if (!$this->abstract_pcid) {
1362  $content = "<dummy><PageObject><PageContent><Paragraph>" .
1363  $this->obj->getFirstParagraphText() . $link_xml .
1364  "</Paragraph></PageContent></PageObject></dummy>";
1365  } else {
1366  $append_footnotes = "n";
1367  $par = $this->obj->getParagraphForPCID($this->abstract_pcid);
1368  $content = "<dummy><PageObject><PageContent><Paragraph Characteristic='" . $par->getCharacteristic() . "'>" .
1369  $par->getText() . $link_xml .
1370  "</Paragraph></PageContent></PageObject>" . $this->obj->getMultimediaXML() . "</dummy>";
1371  }
1372  } else {
1373  $content = $this->obj->getXMLFromDom(
1374  false,
1375  true,
1376  true,
1377  $link_xml . $template_xml . $this->getComponentPluginsXML(),
1378  false,
1379  $this->getStyleId()
1380  );
1381  }
1382 
1383  // check validation errors
1384  if ($builded !== true) {
1385  $this->displayValidationError($builded);
1386  } else {
1387  $this->displayValidationError((string) $this->edit_repo->getPageError());
1388  }
1389  $this->edit_repo->clearPageError();
1390 
1391  // get title
1392  $pg_title = $this->getPresentationTitle();
1393  $col_path = '';
1394  $row_path = '';
1395  $cell_path = '';
1396  $item_path = '';
1397  if ($this->getOutputMode() == "edit") {
1398  $col_path = ilUtil::getImagePath("object/col.svg");
1399  $row_path = ilUtil::getImagePath("object/row.svg");
1400  $item_path = ilUtil::getImagePath("page_editor/icon_peadl.svg");
1401  $cell_path = ilUtil::getImagePath("object/cell.svg");
1402  }
1403 
1404  if ($this->getOutputMode() != "offline") {
1405  $enlarge_path = ilUtil::getImagePath("media/enlarge.svg");
1406  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
1407  } else {
1408  $enlarge_path = "images/media/enlarge.svg";
1409  $wb_path = "";
1410  }
1411  $pg_title_class = ($this->getOutputMode() == "print")
1412  ? "ilc_PrintPageTitle"
1413  : "";
1414 
1415  // page splitting only for learning modules and
1416  // digital books
1417  $enable_split_new = ($this->obj->getParentType() == "lm")
1418  ? "y"
1419  : "n";
1420 
1421  // page splitting to next page only for learning modules and
1422  // digital books if next page exists in tree
1423  if (($this->obj->getParentType() == "lm") &&
1425  $this->obj->getParentId(),
1426  $this->obj->getId()
1427  )) {
1428  $enable_split_next = "y";
1429  } else {
1430  $enable_split_next = "n";
1431  }
1432 
1433  $img_path = ilUtil::getImagePath("", false, $this->getOutputMode(), $this->getOutputMode() == "offline");
1434 
1435 
1436  if ($this->getPageConfig()->getEnablePCType("Tabs")) {
1439  }
1440 
1441  // needed for placeholders
1442  $this->tpl->addCss(ilObjStyleSheet::getBaseContentStylePath());
1443 
1446  $this->sourcecode_download_script = $this->determineSourcecodeDownloadScript();
1447 
1448  // default values for various parameters (should be used by
1449  // all instances in the future)
1450  $media_mode = ($this->getOutputMode() == "edit")
1451  ? $this->user->getPref("ilPageEditor_MediaMode")
1452  : "enable";
1453 
1454  $paste = (ilEditClipboard::getAction() == "copy" &&
1455  $this->getOutputMode() == "edit");
1456 
1457  $flv_video_player = ilPlayerUtil::getFlashVideoPlayerFilename(true);
1458 
1459  $cfg = $this->getPageConfig();
1460 
1461  $current_ts = time();
1462 
1463  $enable_href = $this->getEnabledHref();
1464  if ($this->getOutputMode() == self::EDIT) {
1465  $enable_href = false;
1466  }
1467 
1468  // added UTF-8 encoding otherwise umlaute are converted too
1469  $params = array('mode' => $this->getOutputMode(), 'pg_title' => htmlentities($pg_title, ENT_QUOTES, "UTF-8"),
1470  'enable_placeholder' => $cfg->getEnablePCType("PlaceHolder") ? "y" : "n",
1471  'pg_id' => $this->obj->getId(), 'pg_title_class' => $pg_title_class,
1472  'webspace_path' => $wb_path, 'enlarge_path' => $enlarge_path,
1473  'img_col' => $col_path,
1474  'img_row' => $row_path,
1475  'img_cell' => $cell_path,
1476  'img_item' => $item_path,
1477  'acc_save_url' => "./ilias.php?baseClass=ilaccordionpropertiesstoragegui&cmd=setOpenedTab" .
1478  "&user_id=" . $this->user->getId(),
1479  'append_footnotes' => $append_footnotes,
1480  'compare_mode' => $this->getCompareMode() ? "y" : "n",
1481  'enable_split_new' => $enable_split_new,
1482  'enable_split_next' => $enable_split_next,
1483  'link_params' => $this->link_params,
1484  'file_download_link' => $file_download_link,
1485  'fullscreen_link' => $fullscreen_link,
1486  'img_path' => $img_path,
1487  'parent_id' => $this->obj->getParentId(),
1488  'download_script' => $this->sourcecode_download_script,
1489  'encoded_download_script' => urlencode($this->sourcecode_download_script),
1490  'enable_rep_objects' => $cfg->getEnablePCType("Resources") ? "y" : "n",
1491  'enable_login_page' => $cfg->getEnablePCType("LoginPageElement") ? "y" : "n",
1492  'enable_map' => ($cfg->getEnablePCType("Map") && ilMapUtil::isActivated()) ? "y" : "n",
1493  'enable_tabs' => $cfg->getEnablePCType("Tabs") ? "y" : "n",
1494  'enable_sa_qst' => $cfg->getEnableSelfAssessment() ? "y" : "n",
1495  'enable_file_list' => $cfg->getEnablePCType("FileList") ? "y" : "n",
1496  'enable_content_includes' => $cfg->getEnablePCType("ContentInclude") ? "y" : "n",
1497  'enable_content_templates' => (count($this->getPageObject()->getContentTemplates()) > 0) ? "y" : "n",
1498  'paste' => $paste ? "y" : "n",
1499  'media_mode' => $media_mode,
1500  'javascript' => $sel_js_mode,
1501  'paragraph_plugins' => $paragraph_plugin_string,
1502  'disable_auto_margins' => $disable_auto_margins,
1503  'page_toc' => $cfg->getEnablePageToc() ? "y" : "n",
1504  'enable_profile' => $cfg->getEnablePCType("Profile") ? "y" : "n",
1505  'enable_verification' => $cfg->getEnablePCType("Verification") ? "y" : "n",
1506  'enable_blog' => $cfg->getEnablePCType("Blog") ? "y" : "n",
1507  'enable_skills' => $cfg->getEnablePCType("Skills") ? "y" : "n",
1508  'enable_learning_history' => $cfg->getEnablePCType("LearningHistory") ? "y" : "n",
1509  'enable_qover' => "n",
1510  'enable_consultation_hours' => $cfg->getEnablePCType("ConsultationHours") ? "y" : "n",
1511  'enable_my_courses' => $cfg->getEnablePCType("MyCourses") ? "y" : "n",
1512  'enable_amd_page_list' => $cfg->getEnablePCType("AMDPageList") ? "y" : "n",
1513  'current_ts' => $current_ts,
1514  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
1515  'flv_video_player' => $flv_video_player,
1516  'page_perma_link' => $this->getPagePermaLink(),
1517  'activated_protection' =>
1518  ($this->getPageConfig()->getSectionProtection() == \ilPageConfig::SEC_PROTECT_PROTECTED) ? "y" : "n",
1519  'protection_text' => $this->lng->txt("cont_sec_protected_text"),
1520  'enable_href' => $enable_href
1521  );
1522  if ($this->link_frame != "") { // todo other link types
1523  $params["pg_frame"] = $this->link_frame;
1524  }
1525 
1526  //$content = str_replace("&nbsp;", "", $content);
1527 
1528  // this ensures that cache is emptied with every update
1529  $params["version"] = ILIAS_VERSION;
1530  // ensure no cache hit, if included files/media objects have been changed
1531  $params["incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1532 
1533 
1534  // should be modularized
1535  $md5_adds = ilPCSection::getCacheTriggerString($this->getPageObject());
1536  // run xslt
1537  $md5 = md5(serialize($params) . $link_xml . $template_xml . $md5_adds);
1538 
1539  //$a = microtime();
1540 
1541  // check cache (same parameters, non-edit mode and rendered time
1542  // > last change
1543  $is_error = false;
1544  if (($this->getOutputMode() == "preview" || $this->getOutputMode() == "presentation") &&
1545  !$this->getCompareMode() &&
1546  !$this->getAbstractOnly() &&
1547  $md5 == $this->obj->getRenderMd5() &&
1548  ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1549  $this->obj->getRenderedTime() != "" &&
1550  $this->obj->old_nr == 0) {
1551  // cache hit
1552  $output = $this->obj->getRenderedContent();
1553  } else {
1554  $this->log->debug("Calling XSLT, content: " . substr($content, 0, 100));
1555  try {
1556  $output = $this->xsl->process($content, $params);
1557  } catch (Exception $e) {
1558  $output = "";
1559  if ($this->getOutputMode() == "edit") {
1560  $output = "<pre>" . $e->getMessage() . "<br>" . htmlentities($content) . "</pre>";
1561  $is_error = true;
1562  }
1563  }
1564  if (($this->getOutputMode() == "presentation" || $this->getOutputMode() == "preview")
1565  && !$this->getAbstractOnly()
1566  && $this->obj->old_nr == 0) {
1567  $this->obj->writeRenderedContent($output, $md5);
1568  }
1569  }
1570 
1571  if (!$is_error) {
1572  // unmask user html
1573  if (($this->getOutputMode() != "edit" ||
1574  $this->user->getPref("ilPageEditor_HTMLMode") != "disable")
1575  && !$this->getPageConfig()->getPreventHTMLUnmasking()) {
1576  $output = str_replace("&lt;", "<", $output);
1577  $output = str_replace("&gt;", ">", $output);
1578  }
1579  $output = str_replace("&amp;", "&", $output);
1580 
1581  $output = ilMathJax::getInstance()->insertLatexImages($output);
1582 
1583  // insert page snippets
1584  //$output = $this->insertContentIncludes($output);
1585 
1586  // insert resource blocks
1587  $output = $this->insertResources($output);
1588 
1589  // insert page toc
1590  if ($this->getPageConfig()->getEnablePageToc()) {
1591  $output = $this->insertPageToc($output);
1592  }
1593 
1594  // insert advanced output trigger
1595  $output = $this->insertAdvTrigger($output);
1596 
1597  // workaround for preventing template engine
1598  // from hiding paragraph text that is enclosed
1599  // in curly brackets (e.g. "{a}", see ilLMEditorGUI::executeCommand())
1600  $output = $this->replaceCurlyBrackets($output);
1601 
1602  // remove all newlines (important for code / pre output)
1603  $output = str_replace("\n", "", $output);
1604 
1605  //echo htmlentities($output);
1606  $output = $this->postOutputProcessing($output);
1607  //echo htmlentities($output);
1608  if ($this->getOutputMode() == "edit" &&
1609  !$this->getPageObject()->getActive($this->getPageConfig()->getEnableScheduledActivation())) {
1610  $output = '<div class="copg-disabled-page"><div class="ilCopgDisabledText">' . $this->getDisabledText() . '</div>' . $output . '</div>';
1611  }
1612 
1613  // for all page components...
1614  $defs = $this->pc_definition->getPCDefinitions();
1615  foreach ($defs as $def) {
1616  $pc_class = $def["pc_class"];
1617  $pc_obj = new $pc_class($this->getPageObject());
1618  $pc_obj->setSourcecodeDownloadScript($this->determineSourcecodeDownloadScript());
1619  $pc_obj->setFileDownloadLink($this->determineFileDownloadLink());
1620  $pc_obj->setFullscreenLink($this->determineFullscreenLink());
1621  $pc_obj->setProfileBackUrl($this->getProfileBackUrl());
1622 
1623  // post xsl page content modification by pc elements
1624  $output = $pc_obj->modifyPageContentPostXsl($output, $this->getOutputMode(), $this->getAbstractOnly());
1625  }
1626  }
1627 
1628  $this->addResourcesToTemplate($main_tpl);
1629 
1630  // $output = $this->selfAssessmentRendering($output);
1631 
1632  // output
1633  if ($this->ctrl->isAsynch() && !$this->getRawPageContent() &&
1634  $this->getOutputMode() == "edit") {
1635  // e.g. ###3:110dad8bad6df8620071a0a693a2d328###
1636  $up_pc = $this->request->getString("updated_pc_id_str");
1637  if ($up_pc != "") {
1638  echo $up_pc;
1639  }
1640  $tpl->setVariable($this->getTemplateOutputVar(), $output);
1641  $tpl->setCurrentBlock("edit_page");
1643  echo $tpl->get("edit_page");
1644  exit;
1645  }
1646  $edit_init = "";
1647  if ($this->getOutputMode() === "edit") {
1648  $edit_init = $this->editor_gui->init()->getInitHtml($this->getOpenPlaceHolder());
1649  }
1650  if ($this->outputToTemplate()) {
1651  $tpl->setVariable($this->getTemplateOutputVar(), $output);
1652  $this->tpl->setVariable($this->getTemplateTargetVar(), $tpl->get() . $edit_init);
1653  return $output;
1654  } else {
1655  if ($this->getRawPageContent()) { // e.g. needed in glossaries
1656  return $output . $edit_init;
1657  } else {
1658  $tpl->setVariable($this->getTemplateOutputVar(), $output);
1659  return $tpl->get() . $edit_init;
1660  }
1661  }
1662  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
exit
Definition: login.php:29
static getInitHTML(string $a_url)
Get initialisation HTML to use internal link editing.
const ILIAS_VERSION
postOutputProcessing(string $a_output)
Finalizing output processing.
const IL_CAL_DATETIME
const ANONYMOUS_USER_ID
Definition: constants.php:27
static collectContentIncludes(ilPageObject $a_page, DOMDocument $a_domdoc)
get all content includes that are used within the page
touchBlock(string $block)
overwrites ITX::touchBlock.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
replaceCurlyBrackets(string $output)
static includePresentationJS(ilGlobalTemplateInterface $a_tpl=null)
Include media object presentation JS.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
static lookupTitle(int $a_page_id)
setVariable(string $variable, $value='')
Sets the given variable to the given value.
insertResources(string $a_output)
static hasSuccessorPage(int $a_cont_obj_id, int $a_page_id)
checks if page has a successor page
static addJavaScript(ilGlobalTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
addResourcesToTemplate(ilGlobalTemplateInterface $tpl)
Add resources to template.
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
static addCss()
Add required css.
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
static _lookupTitle(int $obj_id)
static isTypeAllowed(string $a_type)
getComponentPluginsXML()
Put information about activated plugins into XML.
ILIAS COPage Link LinkManager $link
ilGlobalTemplateInterface $tpl
getEnablePCType(string $a_pc_type)
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
static isActivated()
Checks whether Map feature is activated.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
static getInstance()
Singleton: get instance for use in ILIAS requests with a config loaded from the settings.
static getFlashVideoPlayerFilename(bool $a_fullpath=false)
insertPageToc(string $a_output)
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
static _lookupType(int $id, bool $reference=false)
static getCacheTriggerString(ilPageObject $a_page)
Get page cache update trigger string.
insertAdvTrigger(string $a_output)
Insert adv content trigger.
static initMediaElementJs(ilGlobalTemplateInterface $a_tpl=null)
Init mediaelement.js scripts.
displayValidationError($a_error)
display validation error
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ switchToLanguage()

ilPageObjectGUI::switchToLanguage ( )

Switch to language.

Definition at line 3089 of file class.ilPageObjectGUI.php.

References checkLangPageAvailable(), confirmPageTranslationCreation(), ILIAS\Repository\ctrl(), and getPageObject().

3089  : void
3090  {
3091  $l = $this->request->getString("totransl");
3092  $p = $this->getPageObject();
3093  if (!$this->checkLangPageAvailable($p->getId(), $l)) {
3095  return;
3096  }
3097  $this->ctrl->setParameter($this, "transl", $l);
3098  $this->ctrl->redirect($this, "edit");
3099  }
confirmPageTranslationCreation()
Confirm page translation creation.
checkLangPageAvailable(int $id, string $lang)
+ Here is the call graph for this function:

Field Documentation

◆ $abstract_only

bool ilPageObjectGUI::$abstract_only = false
private

Definition at line 106 of file class.ilPageObjectGUI.php.

Referenced by getAbstractOnly().

◆ $abstract_pcid

string ilPageObjectGUI::$abstract_pcid = ""
protected

Definition at line 116 of file class.ilPageObjectGUI.php.

◆ $access

◆ $act_meth

string ilPageObjectGUI::$act_meth = ""
protected

Definition at line 58 of file class.ilPageObjectGUI.php.

◆ $act_obj

object ilPageObjectGUI::$act_obj
protected

Definition at line 59 of file class.ilPageObjectGUI.php.

◆ $activated

bool ilPageObjectGUI::$activated = true

Definition at line 90 of file class.ilPageObjectGUI.php.

◆ $activation

bool ilPageObjectGUI::$activation = false

Definition at line 89 of file class.ilPageObjectGUI.php.

◆ $adv_ref_id

int ilPageObjectGUI::$adv_ref_id = null
protected

Definition at line 136 of file class.ilPageObjectGUI.php.

Referenced by getAdvMdRecordObject().

◆ $adv_subtype

string ilPageObjectGUI::$adv_subtype = null
protected

Definition at line 138 of file class.ilPageObjectGUI.php.

Referenced by getAdvMdRecordObject().

◆ $adv_type

string ilPageObjectGUI::$adv_type = null
protected

Definition at line 137 of file class.ilPageObjectGUI.php.

Referenced by getAdvMdRecordObject().

◆ $change_comments

bool ilPageObjectGUI::$change_comments = false

Definition at line 88 of file class.ilPageObjectGUI.php.

Referenced by isEnabledChangeComments().

◆ $compare

ILIAS COPage Compare PageCompare ilPageObjectGUI::$compare
protected

Definition at line 143 of file class.ilPageObjectGUI.php.

◆ $compare_mode

bool ilPageObjectGUI::$compare_mode = false

Definition at line 102 of file class.ilPageObjectGUI.php.

Referenced by getCompareMode().

◆ $component_factory

ilComponentFactory ilPageObjectGUI::$component_factory
protected

Definition at line 142 of file class.ilPageObjectGUI.php.

◆ $concrete_lang

string ilPageObjectGUI::$concrete_lang = ""
protected

Definition at line 139 of file class.ilPageObjectGUI.php.

Referenced by ilLMPageGUI\__construct(), and __construct().

◆ $ctrl

ilCtrl ilPageObjectGUI::$ctrl
protected

Definition at line 72 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\activateWikiPageRating(), ilWikiPageGUI\blockWikiPage(), ilBlogPostingGUI\cancelBlogPostingDeletion(), ilMediaPoolPageGUI\cancelSaveNewMediaPoolPage(), ilWikiPageGUI\cancelWikiPageDeletion(), ilBlogPostingGUI\confirmBlogPostingDeletion(), ilWikiPageGUI\confirmWikiPageDeletion(), ilWikiPageGUI\deactivateWikiPageRating(), ilBlogPostingGUI\deleteBlogPostingConfirmationScreen(), ilWikiPageGUI\deleteWikiPageConfirmationScreen(), ilWikiPageGUI\editAdvancedMetaData(), ilWikiPageGUI\executeCommand(), ilPortfolioPageGUI\executeCommand(), ilBlogPostingGUI\executeCommand(), ilWikiPageGUI\finalizeAssignment(), ilContainerPageGUI\getAdditionalPageActions(), ilBlogPostingGUI\getTabs(), ilWikiPageGUI\getTabs(), ilPortfolioTemplatePageGUI\getViewPageLink(), ilPortfolioPageGUI\getViewPageLink(), ilWikiPageGUI\hideAdvancedMetaData(), ilWikiPageGUI\initAdvancedMetaDataForm(), ilBlogPostingGUI\initDateForm(), ilPageLayoutGUI\initForm(), ilMediaPoolPageGUI\initMediaPoolPageForm(), ilWikiPageGUI\initRenameForm(), ilBlogPostingGUI\initTitleForm(), ilWikiPageGUI\insertWikiLink(), ilPortfolioPageGUI\makePlaceHoldersClickable(), ilWikiPageGUI\postOutputProcessing(), ilBlogPostingGUI\preview(), ilWikiPageGUI\preview(), ilWikiPageGUI\renamePage(), ilPortfolioPageGUI\renderBlog(), ilPortfolioPageGUI\renderMyCourses(), ilPortfolioPageGUI\renderProfile(), ilMediaPoolPageGUI\saveMediaPoolPage(), ilMediaPoolPageGUI\setMediaPoolPageTabs(), ilPageLayoutGUI\setTabs(), ilMediaPoolPageGUI\showMediaPoolPageUsages(), ilWikiPageGUI\unblockWikiPage(), ilWikiPageGUI\unhideAdvancedMetaData(), ilWikiPageGUI\updateAdvancedMetaData(), and ilMediaPoolPageGUI\updateMediaPoolPage().

◆ $edit_repo

EditSessionRepository ilPageObjectGUI::$edit_repo
protected

Definition at line 54 of file class.ilPageObjectGUI.php.

◆ $editor_gui

ILIAS COPage Editor GUIService ilPageObjectGUI::$editor_gui
protected

Definition at line 46 of file class.ilPageObjectGUI.php.

◆ $editpreview

bool ilPageObjectGUI::$editpreview = false

Definition at line 91 of file class.ilPageObjectGUI.php.

Referenced by getEditPreview().

◆ $enabled_href

bool ilPageObjectGUI::$enabled_href = true
protected

Definition at line 133 of file class.ilPageObjectGUI.php.

Referenced by getEnabledHref().

◆ $enabled_news

bool ilPageObjectGUI::$enabled_news = false
protected

Definition at line 122 of file class.ilPageObjectGUI.php.

Referenced by getEnabledNews().

◆ $enabledcontentincludes

bool ilPageObjectGUI::$enabledcontentincludes = false

Definition at line 101 of file class.ilPageObjectGUI.php.

◆ $enabledpagefocus

bool ilPageObjectGUI::$enabledpagefocus
protected

Definition at line 64 of file class.ilPageObjectGUI.php.

Referenced by getEnabledPageFocus().

◆ $enableediting

bool ilPageObjectGUI::$enableediting = true

Definition at line 99 of file class.ilPageObjectGUI.php.

Referenced by getEnableEditing().

◆ $exp_frame

string ilPageObjectGUI::$exp_frame = ""
protected

Definition at line 57 of file class.ilPageObjectGUI.php.

◆ $exp_id

string ilPageObjectGUI::$exp_id = ""
protected

Definition at line 56 of file class.ilPageObjectGUI.php.

◆ $exp_target_script

string ilPageObjectGUI::$exp_target_script = ""
protected

Definition at line 55 of file class.ilPageObjectGUI.php.

◆ $file_download_link

string ilPageObjectGUI::$file_download_link = ''
protected

◆ $form

◆ $fullscreen_link

string ilPageObjectGUI::$fullscreen_link = ''
protected

Definition at line 109 of file class.ilPageObjectGUI.php.

Referenced by determineFullscreenLink(), getFullscreenLink(), and showPage().

◆ $gui

ILIAS COPage InternalGUIService ilPageObjectGUI::$gui
protected

◆ $header

string ilPageObjectGUI::$header = ""
protected

Definition at line 131 of file class.ilPageObjectGUI.php.

Referenced by getHeader().

◆ $help

ilHelpGUI ilPageObjectGUI::$help
protected

Definition at line 77 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\setScreenIdComponent().

◆ $id

◆ $int_link_return

string ilPageObjectGUI::$int_link_return = ""
protected

Definition at line 132 of file class.ilPageObjectGUI.php.

◆ $language

string ilPageObjectGUI::$language
protected

◆ $link

◆ $link_frame

string ilPageObjectGUI::$link_frame = ''
protected

Definition at line 110 of file class.ilPageObjectGUI.php.

Referenced by getLinkFrame(), and showPage().

◆ $link_params

string ilPageObjectGUI::$link_params = ""

Definition at line 86 of file class.ilPageObjectGUI.php.

Referenced by getLinkParams(), and showPage().

◆ $link_xml

string ilPageObjectGUI::$link_xml
protected

Definition at line 65 of file class.ilPageObjectGUI.php.

Referenced by displayMedia(), and getLinkXML().

◆ $link_xml_set

bool ilPageObjectGUI::$link_xml_set = false

Definition at line 98 of file class.ilPageObjectGUI.php.

◆ $lng

ilLanguage ilPageObjectGUI::$lng
protected

Definition at line 71 of file class.ilPageObjectGUI.php.

Referenced by ilBlogPostingGUI\__construct(), ilWikiPageGUI\activateWikiPageRating(), ilWikiPageGUI\blockWikiPage(), ilBlogPostingGUI\confirmBlogPostingDeletion(), ilWikiPageGUI\confirmWikiPageDeletion(), ilWikiPageGUI\deactivateWikiPageRating(), ilBlogPostingGUI\deleteBlogPostingConfirmationScreen(), ilWikiPageGUI\deleteWikiPageConfirmationScreen(), ilWikiPageGUI\edit(), ilWikiPageGUI\editAdvancedMetaData(), ilWikiPageGUI\executeCommand(), ilWikiPageGUI\finalizeAssignment(), ilBlogPostingGUI\getActivationCaptions(), ilContainerPageGUI\getAdditionalPageActions(), ilWikiPageGUI\hideAdvancedMetaData(), ilWikiPageGUI\initAdvancedMetaDataForm(), ilBlogPostingGUI\initDateForm(), ilWikiPageGUI\initEditingJS(), ilPageLayoutGUI\initForm(), ilMediaPoolPageGUI\initMediaPoolPageForm(), ilWikiPageGUI\initRenameForm(), ilBlogPostingGUI\initTitleForm(), ilWikiPageGUI\insertWikiLink(), ilPortfolioPageGUI\makePlaceHoldersClickable(), ilLMPageGUI\onFeedbackEditingForwarding(), ilImprintGUI\postOutputProcessing(), ilWikiPageGUI\preview(), ilLMPageGUI\processAnswer(), ilWikiPageGUI\renamePage(), ilMediaPoolPageGUI\saveMediaPoolPage(), ilWikiPageGUI\searchWikiLinkAC(), ilMediaPoolPageGUI\setMediaPoolPageTabs(), ilPageLayoutGUI\setTabs(), ilImprintGUI\showEditToolbar(), showEditToolbar(), ilMediaPoolPageGUI\showMediaPoolPageUsages(), ilWikiPageGUI\unblockWikiPage(), ilWikiPageGUI\unhideAdvancedMetaData(), ilWikiPageGUI\updateAdvancedMetaData(), ilBlogPostingGUI\updateDate(), ilMediaPoolPageGUI\updateMediaPoolPage(), ilPageLayoutGUI\updateProperties(), and ilBlogPostingGUI\updateTitle().

◆ $log

ilLogger ilPageObjectGUI::$log
protected

Definition at line 75 of file class.ilPageObjectGUI.php.

◆ $meta_data_observer_func

string ilPageObjectGUI::$meta_data_observer_func = ""

Definition at line 97 of file class.ilPageObjectGUI.php.

◆ $meta_data_observer_obj

object ilPageObjectGUI::$meta_data_observer_obj = null

Definition at line 96 of file class.ilPageObjectGUI.php.

◆ $meta_data_rep_obj

ilObject ilPageObjectGUI::$meta_data_rep_obj = null

Definition at line 93 of file class.ilPageObjectGUI.php.

◆ $meta_data_sub_obj_id

int ilPageObjectGUI::$meta_data_sub_obj_id = 0

Definition at line 94 of file class.ilPageObjectGUI.php.

◆ $meta_data_type

string ilPageObjectGUI::$meta_data_type = ""

Definition at line 95 of file class.ilPageObjectGUI.php.

◆ $news_obj_id

int ilPageObjectGUI::$news_obj_id = 0
protected

Definition at line 123 of file class.ilPageObjectGUI.php.

◆ $news_obj_type

string ilPageObjectGUI::$news_obj_type = ""
protected

Definition at line 124 of file class.ilPageObjectGUI.php.

◆ $notes

ILIAS Notes Service ilPageObjectGUI::$notes
protected

Definition at line 47 of file class.ilPageObjectGUI.php.

◆ $notes_enabled

bool ilPageObjectGUI::$notes_enabled = false
protected

Definition at line 129 of file class.ilPageObjectGUI.php.

Referenced by isEnabledNotes().

◆ $notes_parent_id

int ilPageObjectGUI::$notes_parent_id = 0
protected

Definition at line 61 of file class.ilPageObjectGUI.php.

◆ $obj

◆ $offline_directory

string ilPageObjectGUI::$offline_directory = ""
protected

Definition at line 128 of file class.ilPageObjectGUI.php.

Referenced by getOfflineDirectory().

◆ $old_nr

int ilPageObjectGUI::$old_nr = 0
protected

Definition at line 66 of file class.ilPageObjectGUI.php.

Referenced by getOldNr().

◆ $open_place_holder

string ilPageObjectGUI::$open_place_holder = ""
protected

Definition at line 118 of file class.ilPageObjectGUI.php.

Referenced by getOpenPlaceHolder().

◆ $output2template

bool ilPageObjectGUI::$output2template = false

Definition at line 85 of file class.ilPageObjectGUI.php.

Referenced by outputToTemplate().

◆ $output_mode

string ilPageObjectGUI::$output_mode = ""
protected

Definition at line 79 of file class.ilPageObjectGUI.php.

Referenced by getOutputMode().

◆ $page_back_title

string ilPageObjectGUI::$page_back_title = ""

Definition at line 60 of file class.ilPageObjectGUI.php.

◆ $page_config

ilPageConfig ilPageObjectGUI::$page_config = null

◆ $page_linker

ILIAS COPage PageLinker ilPageObjectGUI::$page_linker
protected

Definition at line 115 of file class.ilPageObjectGUI.php.

Referenced by setPageLinker().

◆ $parent_type

string ilPageObjectGUI::$parent_type = ""
protected

Definition at line 107 of file class.ilPageObjectGUI.php.

Referenced by getParentType().

◆ $pc_definition

ILIAS COPage PC PCDefinition ilPageObjectGUI::$pc_definition
protected

Definition at line 44 of file class.ilPageObjectGUI.php.

◆ $pl_end

string ilPageObjectGUI::$pl_end = "}}}}}"

Definition at line 113 of file class.ilPageObjectGUI.php.

◆ $pl_start

string ilPageObjectGUI::$pl_start = "{{{{{"

Definition at line 112 of file class.ilPageObjectGUI.php.

◆ $pm

ILIAS COPage Page PageManager ilPageObjectGUI::$pm
protected

Definition at line 41 of file class.ilPageObjectGUI.php.

◆ $prependinghtml

string ilPageObjectGUI::$prependinghtml = ""
protected

Definition at line 130 of file class.ilPageObjectGUI.php.

Referenced by getPrependingHtml().

◆ $presentation_title

string ilPageObjectGUI::$presentation_title = ""

Definition at line 80 of file class.ilPageObjectGUI.php.

Referenced by getPresentationTitle().

◆ $profile_back_url

string ilPageObjectGUI::$profile_back_url = ""
protected

Definition at line 140 of file class.ilPageObjectGUI.php.

Referenced by getProfileBackUrl().

◆ $questioninfo

ILIAS TestQuestionPool QuestionInfoService ilPageObjectGUI::$questioninfo
protected

Definition at line 40 of file class.ilPageObjectGUI.php.

◆ $rawpagecontent

bool ilPageObjectGUI::$rawpagecontent = false

Definition at line 100 of file class.ilPageObjectGUI.php.

Referenced by getRawPageContent().

◆ $render_page_container

bool ilPageObjectGUI::$render_page_container = false

Definition at line 105 of file class.ilPageObjectGUI.php.

Referenced by getRenderPageContainer().

◆ $request

EditGUIRequest ilPageObjectGUI::$request
protected

Definition at line 53 of file class.ilPageObjectGUI.php.

Referenced by ilBlogPostingGUI\saveKeywordsForm().

◆ $requested_file_id

string ilPageObjectGUI::$requested_file_id
protected

Definition at line 50 of file class.ilPageObjectGUI.php.

◆ $requested_history_mode

int ilPageObjectGUI::$requested_history_mode = 0
protected

Definition at line 121 of file class.ilPageObjectGUI.php.

◆ $requested_old_nr

int ilPageObjectGUI::$requested_old_nr
protected

Definition at line 52 of file class.ilPageObjectGUI.php.

Referenced by __construct().

◆ $requested_pg_id

int ilPageObjectGUI::$requested_pg_id
protected

Definition at line 49 of file class.ilPageObjectGUI.php.

Referenced by showMediaFullscreen().

◆ $requested_q_id

int ilPageObjectGUI::$requested_q_id = 0
protected

Definition at line 120 of file class.ilPageObjectGUI.php.

Referenced by executeCommand().

◆ $requested_ref_id

int ilPageObjectGUI::$requested_ref_id
protected

Definition at line 48 of file class.ilPageObjectGUI.php.

◆ $requested_transl

string ilPageObjectGUI::$requested_transl
protected

Definition at line 51 of file class.ilPageObjectGUI.php.

◆ $requested_user_id

int ilPageObjectGUI::$requested_user_id = 0
protected

Definition at line 119 of file class.ilPageObjectGUI.php.

◆ $return_location

string ilPageObjectGUI::$return_location = ""

Definition at line 82 of file class.ilPageObjectGUI.php.

◆ $sourcecode_download_script

string ilPageObjectGUI::$sourcecode_download_script = ""

◆ $styleid

int ilPageObjectGUI::$styleid = 0
protected

Definition at line 63 of file class.ilPageObjectGUI.php.

Referenced by getStyleId().

◆ $tab_hook

array ilPageObjectGUI::$tab_hook = null
protected

Definition at line 125 of file class.ilPageObjectGUI.php.

◆ $tabs_enabled

bool ilPageObjectGUI::$tabs_enabled = true

Definition at line 104 of file class.ilPageObjectGUI.php.

Referenced by getEnabledTabs().

◆ $tabs_gui

◆ $target_script

string ilPageObjectGUI::$target_script = ""

Definition at line 81 of file class.ilPageObjectGUI.php.

◆ $target_var

string ilPageObjectGUI::$target_var = ""

Definition at line 83 of file class.ilPageObjectGUI.php.

Referenced by getTemplateTargetVar().

◆ $template_output_var

string ilPageObjectGUI::$template_output_var = ""

Definition at line 84 of file class.ilPageObjectGUI.php.

Referenced by getTemplateOutputVar().

◆ $tool_context

ILIAS GlobalScreen ScreenContext ContextServices ilPageObjectGUI::$tool_context
protected

Definition at line 111 of file class.ilPageObjectGUI.php.

◆ $toolbar

ilToolbarGUI ilPageObjectGUI::$toolbar
protected

◆ $tpl

◆ $ui

◆ $use_meta_data

bool ilPageObjectGUI::$use_meta_data = false

Definition at line 92 of file class.ilPageObjectGUI.php.

◆ $user

◆ $view_page_link

string ilPageObjectGUI::$view_page_link = ""
protected

Definition at line 126 of file class.ilPageObjectGUI.php.

Referenced by getViewPageLink().

◆ $view_page_target

string ilPageObjectGUI::$view_page_target = ""
protected

Definition at line 127 of file class.ilPageObjectGUI.php.

Referenced by getViewPageTarget().

◆ $xsl

ILIAS COPage Xsl XslManager ilPageObjectGUI::$xsl
protected

Definition at line 45 of file class.ilPageObjectGUI.php.

◆ EDIT

◆ OFFLINE

◆ PRESENTATION

◆ PREVIEW

◆ PRINTING

const ilPageObjectGUI::PRINTING = "print"

The documentation for this class was generated from the following file: