ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)
 
 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 $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 Questions PublicInterface $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 151 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().

158  {
159  global $DIC;
160 
161  $this->log = ilLoggerFactory::getLogger('copg');
162  $this->tpl = $DIC->ui()->mainTemplate();
163  $this->ctrl = $DIC->ctrl();
164  $this->lng = $DIC->language();
165  $this->tabs_gui = $DIC->tabs();
166  $this->access = $DIC->access();
167  $this->user = $DIC->user();
168  $this->help = $DIC["ilHelp"];
169  $this->ui = $DIC->ui();
170  $this->toolbar = $DIC->toolbar();
171  $this->component_factory = $DIC["component.factory"];
172 
173  $this->request = $DIC
174  ->copage()
175  ->internal()
176  ->gui()
177  ->page()
178  ->editRequest();
179 
180  $this->questioninfo = $DIC->testQuestion();
181 
182  $this->requested_old_nr = $this->request->getInt("old_nr");
183  $this->requested_transl = $this->request->getString("transl");
184  $this->requested_file_id = $this->request->getString("file_id");
185  $this->requested_ref_id = $this->request->getInt("ref_id");
186  $this->requested_pg_id = $this->request->getInt("pg_id");
187  $this->concrete_lang = $concrete_lang;
188 
189  $this->setParentType($a_parent_type);
190  $this->setId($a_id);
191  if ($a_old_nr == 0 && !$a_prevent_get_id && $this->requested_old_nr > 0) {
192  $a_old_nr = $this->requested_old_nr;
193  }
194  $this->setOldNr($a_old_nr);
195 
196  if ($a_lang == "" && $this->requested_transl != '') {
197  $this->setLanguage($this->requested_transl);
198  } else {
199  if ($a_lang == "") {
200  $a_lang = "-";
201  }
202  $this->setLanguage($a_lang);
203  }
204 
205 
206  $this->setOutputMode(self::PRESENTATION);
207  $this->setEnabledPageFocus(true);
208  $this->initPageObject();
209  $this->setPageConfig($this->getPageObject()->getPageConfig());
210 
211  $this->page_linker = new ilPageLinker(get_class($this));
212 
213  $this->output2template = true;
214 
215  $this->template_output_var = "PAGE_CONTENT";
216  $this->page_back_title = $this->lng->txt("page");
217  $this->lng->loadLanguageModule("content");
218  $this->lng->loadLanguageModule("copg");
219 
220  $this->tool_context = $DIC->globalScreen()->tool()->context();
221 
222  $this->setTemplateOutput(false);
223 
224  $this->ctrl->saveParameter($this, "transl");
225 
226 
227  $this->requested_user_id = $this->request->getInt("user");
228  $this->requested_q_id = $this->request->getInt("q_id");
229  $this->requested_history_mode = $this->request->getInt("history_mode");
230 
231  $int_service = $DIC
232  ->copage()
233  ->internal();
234 
235  $this->edit_repo = $int_service
236  ->repo()
237  ->edit();
238 
239  $this->afterConstructor();
240  $this->xsl = $int_service->domain()->xsl();
241  $this->compare = $int_service->domain()->compare();
242  $this->pc_definition = $DIC
243  ->copage()
244  ->internal()
245  ->domain()
246  ->pc()
247  ->definition();
248  $this->gui = $DIC->copage()->internal()->gui();
249  $this->link = $DIC->copage()->internal()->domain()->link();
250  $this->pm = $DIC->copage()->internal()->domain()->page();
251  $this->editor_gui = $DIC->copage()->internal()->gui()->edit();
252  $this->notes = $DIC->notes();
253  }
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: shib_login.php:22
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 752 of file class.ilPageObjectGUI.php.

Referenced by ilMediaPoolPageGUI\setMediaPoolPage().

758  : void {
759  $this->use_meta_data = true;
760  $this->meta_data_rep_obj = $a_rep_obj;
761  $this->meta_data_sub_obj_id = $a_sub_obj_id;
762  $this->meta_data_type = $a_type;
763  $this->meta_data_observer_obj = $a_observer_obj;
764  $this->meta_data_observer_func = $a_observer_func;
765  }
+ Here is the caller graph for this function:

◆ activatePage()

ilPageObjectGUI::activatePage ( )

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

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

Referenced by ilBlogPostingGUI\activatePageToList().

1021  : void
1022  {
1023  $this->getPageObject()->setActivationStart(null);
1024  $this->getPageObject()->setActivationEnd(null);
1025  $this->getPageObject()->setActive(true);
1026  $this->getPageObject()->update();
1027  $this->ctrl->redirect($this, "edit");
1028  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ 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 3158 of file class.ilPageObjectGUI.php.

References ILIAS\UICore\GlobalTemplate\addCss(), ILIAS\UICore\GlobalTemplate\addJavaScript(), ILIAS\UICore\GlobalTemplate\addOnLoadCode(), getOutputMode(), and getPageObject().

Referenced by showPage().

3158  : void
3159  {
3160  $collector = new \ILIAS\COPage\ResourcesCollector($this->getOutputMode(), $this->getPageObject());
3161 
3162  foreach ($collector->getJavascriptFiles() as $js) {
3163  $tpl->addJavaScript($js);
3164  }
3165 
3166  foreach ($collector->getCssFiles() as $css) {
3167  $tpl->addCss($css);
3168  }
3169 
3170  foreach ($collector->getOnloadCode() as $code) {
3171  $tpl->addOnLoadCode($code);
3172  }
3173  }
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.
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ afterConstructor()

ilPageObjectGUI::afterConstructor ( )

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

Referenced by __construct().

260  : void
261  {
262  }
+ Here is the caller graph for this function:

◆ afterDeleteContents()

ilPageObjectGUI::afterDeleteContents ( )

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

3183  : void
3184  {
3185  }

◆ checkLangPageAvailable()

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

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

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

Referenced by switchToLanguage().

3076  : bool
3077  {
3078  $p = $this->getPageObject();
3079  return ilPageObject::_exists($this->getParentType(), $id, $lang);
3080  }
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:25
+ 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 2740 of file class.ilPageObjectGUI.php.

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

2740  : string
2741  {
2742  if (!$this->getEnableEditing()) {
2743  return "";
2744  }
2745 
2746  $tpl = new ilTemplate("tpl.page_compare.html", true, true, "components/ILIAS/COPage");
2747  $this->setBackToHistoryTabs();
2748 
2749  $pg = $this->obj;
2750  $l_page = ilPageObjectFactory::getInstance($pg->getParentType(), $pg->getId(), $this->request->getInt("left"), $pg->getLanguage());
2751  $r_page = ilPageObjectFactory::getInstance($pg->getParentType(), $pg->getId(), $this->request->getInt("right"), $pg->getLanguage());
2752 
2753  $compare = $this->compare->compare(
2754  $this->getPageObject(),
2755  $l_page,
2756  $r_page
2757  );
2758 
2759  // left page
2760  $lpage = $compare["l_page"];
2761  $cfg = $this->getPageConfig();
2762  $cfg->setPreventHTMLUnmasking(true);
2763 
2764  $this->setOutputMode(self::PREVIEW);
2765  $this->setPageObject($lpage);
2766  $this->setPresentationTitle($this->getPresentationTitle());
2767  $this->setCompareMode(true);
2768 
2769  $lhtml = $this->showPage();
2770  $lhtml = $this->replaceDiffTags($lhtml);
2771  $lhtml = str_replace("&lt;br /&gt;", "<br />", $lhtml);
2772  $tpl->setVariable("LEFT", $lhtml);
2773 
2774  // right page
2775  $rpage = $compare["r_page"];
2776  $this->setPageObject($rpage);
2777  $this->setPresentationTitle($this->getPresentationTitle());
2778  $this->setCompareMode(true);
2779  $this->setOutputMode(self::PREVIEW);
2780 
2781  $rhtml = $this->showPage();
2782  $rhtml = $this->replaceDiffTags($rhtml);
2783  $rhtml = str_replace("&lt;br /&gt;", "<br />", $rhtml);
2784  $tpl->setVariable("RIGHT", $rhtml);
2785 
2786  $tpl->setVariable("TXT_NEW", $this->lng->txt("cont_pc_new"));
2787  $tpl->setVariable("TXT_MODIFIED", $this->lng->txt("cont_pc_modified"));
2788  $tpl->setVariable("TXT_DELETED", $this->lng->txt("cont_pc_deleted"));
2789 
2790  return $tpl->get();
2791  }
setOutputMode(string $a_mode=self::PRESENTATION)
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="")
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
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 3085 of file class.ilPageObjectGUI.php.

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

Referenced by switchToLanguage().

3085  : void
3086  {
3087  $l = $this->request->getString("totransl");
3088  $this->ctrl->setParameter($this, "totransl", $l);
3089  $this->lng->loadLanguageModule("meta");
3090 
3091  $cgui = new ilConfirmationGUI();
3092  $cgui->setFormAction($this->ctrl->getFormAction($this));
3093  $cgui->setHeaderText($this->lng->txt("cont_page_translation_does_not_exist") . ": " .
3094  $this->lng->txt("meta_l_" . $l));
3095  $cgui->setCancel($this->lng->txt("cancel"), "editMasterLanguage");
3096  $cgui->setConfirm($this->lng->txt("confirm"), "createPageTranslation");
3097  $this->tpl->setContent($cgui->getHTML());
3098  }
+ 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 3112 of file class.ilPageObjectGUI.php.

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

3112  : void
3113  {
3114  $l = $this->request->getString("totransl");
3115 
3117  $this->getPageObject()->getParentType(),
3118  $this->getPageObject()->getId(),
3119  0,
3120  "-"
3121  );
3122 
3123  $p->copyPageToTranslation($l);
3124  $this->ctrl->setParameter($this, "transl", $l);
3125  $this->ctrl->redirect($this, "edit");
3126  }
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 1012 of file class.ilPageObjectGUI.php.

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

Referenced by ilBlogPostingGUI\deactivatePageToList().

1012  : void
1013  {
1014  $this->getPageObject()->setActivationStart(null);
1015  $this->getPageObject()->setActivationEnd(null);
1016  $this->getPageObject()->setActive(false);
1017  $this->getPageObject()->update();
1018  $this->ctrl->redirect($this, "edit");
1019  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineFileDownloadLink()

ilPageObjectGUI::determineFileDownloadLink ( )

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

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

Referenced by showPage().

767  : string
768  {
770  if ($this->getFileDownloadLink() == "" && $this->getOutputMode() != "offline") {
771  $file_download_link = $this->ctrl->getLinkTarget($this, "downloadFile");
772  }
773  return $file_download_link;
774  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineFullscreenLink()

ilPageObjectGUI::determineFullscreenLink ( )

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

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

Referenced by showPage().

776  : string
777  {
779  if ($this->getFullscreenLink() == "" && $this->getOutputMode() != "offline") {
780  $fullscreen_link = $this->ctrl->getLinkTarget($this, "displayMediaFullscreen", "", false, false);
781  }
782  return $fullscreen_link;
783  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ determineSourcecodeDownloadScript()

ilPageObjectGUI::determineSourcecodeDownloadScript ( )

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

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

Referenced by showPage().

785  : string
786  {
788  if ($this->sourcecode_download_script == "" && $this->getOutputMode() != "offline") {
789  $l = $this->ctrl->getLinkTarget($this, "");
790  }
791  return $l;
792  }
+ 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 2117 of file class.ilPageObjectGUI.php.

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

Referenced by displayMediaFullscreen().

2117  : void
2118  {
2119  $tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "components/ILIAS/LearningModule");
2120  $tpl->setCurrentBlock("ilMedia");
2121 
2122  //$int_links = $page_object->getInternalLinks();
2123  $med_links = ilMediaItem::_getMapAreasIntLinks($this->request->getMobId());
2124 
2125  // @todo
2126  $link_xml = $this->page_linker->getLinkXML($med_links);
2127 
2128  $media_obj = new ilObjMediaObject($this->request->getMobId());
2129  if ($this->request->getPageType() === "mep") {
2130  $pg_obj = new ilMediaPoolPage($this->request->getPageId());
2131  } else {
2132  $pg_obj = $this->getPageObject();
2133  }
2134  $pg_obj->buildDom();
2135 
2136  $xml = "<dummy>";
2137  if ($this->requested_pg_id > 0) {
2138  $xml .= $pg_obj->getMediaAliasElement($this->request->getMobId());
2139  } else {
2140  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
2141  }
2142  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
2143  $xml .= $link_xml;
2144  $xml .= "</dummy>";
2145 
2146  $mode = "media";
2147  if ($a_fullscreen) {
2148  $mode = "fullscreen";
2149  }
2150 
2151  //echo "XML:".htmlentities($xml);
2152  // determine target frames for internal links
2153  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
2154  $enlarge_path = ilUtil::getImagePath("media/enlarge.svg");
2155  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
2156  'link_params' => "ref_id=" . $this->requested_ref_id,'fullscreen_link' => "",
2157  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
2158  'ref_id' => $this->requested_ref_id, 'webspace_path' => $wb_path);
2159  $output = $this->xsl->process($xml, $params);
2160 
2161  // unmask user html
2164  $tpl->setVariable("MEDIA_CONTENT", $output);
2165 
2166  // add js
2168  //$tpl->fillJavaScriptFiles();
2169  //$tpl->fillCssFiles();
2170 
2171  $tpl->printToStdout();
2172  exit;
2173  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setVariable(string $variable, $value='')
Sets the given variable to the given value.
static includePresentationJS(?ilGlobalTemplateInterface $a_tpl=null)
Include media object presentation JS.
static isTypeAllowed(string $a_type)
ilGlobalTemplateInterface $tpl
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _getMapAreasIntLinks(int $a_mob_id)
get all internal links of map areas of a mob
printToStdout(string $part=self::DEFAULT_BLOCK, bool $has_tabs=true, bool $skip_main_menu=false)
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)
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
const IL_MODE_OUTPUT
exit
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:
+ Here is the caller graph for this function:

◆ displayMediaFullscreen()

ilPageObjectGUI::displayMediaFullscreen ( )

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

References displayMedia().

2112  : void
2113  {
2114  $this->displayMedia(true);
2115  }
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 2555 of file class.ilPageObjectGUI.php.

Referenced by showPage().

2555  : void
2556  {
2557  if (is_array($a_error)) {
2558  $error_str = "<strong>Error(s):</strong><br>";
2559  foreach ($a_error as $error) {
2560  $err_mess = implode(" - ", $error);
2561  if (!is_int(strpos($err_mess, ":0:"))) {
2562  $error_str .= htmlentities($err_mess) . "<br />";
2563  }
2564  }
2565  $this->tpl->setVariable("MESSAGE", $error_str);
2566  }
2567  }
+ Here is the caller graph for this function:

◆ download_paragraph()

ilPageObjectGUI::download_paragraph ( )

download source code paragraph

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

References getPageObject().

2178  : void
2179  {
2180  $pg_obj = $this->getPageObject();
2181  $pg_obj->buildDom();
2182  $pg_obj->sendParagraph(
2183  $this->request->getString("par_id"),
2184  $this->request->getString("downloadtitle")
2185  );
2186  }
+ Here is the call graph for this function:

◆ downloadFile()

ilPageObjectGUI::downloadFile ( )

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

References getPageObject().

2102  : void
2103  {
2104  $this->getPageObject()->buildDom();
2105  $cm = $this->pm->content($this->getPageObject()->getDomDoc());
2106  $cm->downloadFile(
2107  $this->getPageObject(),
2108  $this->requested_file_id
2109  );
2110  }
+ Here is the call graph for this function:

◆ edit()

ilPageObjectGUI::edit ( )

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

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

Referenced by executeCommand(), and insertJSAtPlaceholder().

2458  : string
2459  {
2460  $this->setOutputMode(self::EDIT);
2461  $html = $this->showPage();
2462 
2463  if ($this->isEnabledNotes()) {
2464  $html .= "<br /><br />" . $this->getNotesHTML();
2465  }
2466 
2467  return $html;
2468  }
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 2806 of file class.ilPageObjectGUI.php.

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

2806  : void
2807  {
2808  $this->setBackToEditTabs();
2809 
2810  $atpl = new ilTemplate("tpl.page_activation.php", true, true, "components/ILIAS/COPage");
2811  $this->initActivationForm();
2812  $this->getActivationFormValues();
2813  $atpl->setVariable("FORM", $this->form->getHTML());
2814  $this->tpl->setContent($atpl->get());
2815  }
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 3103 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl().

3103  : void
3104  {
3105  $this->ctrl->setParameter($this, "transl", "-");
3106  $this->ctrl->redirect($this, "edit");
3107  }
+ Here is the call graph for this function:

◆ enableNotes()

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

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

527  : void
528  {
529  $this->notes_enabled = $a_enabled;
530  $this->notes_parent_id = $a_parent_id;
531  }

◆ executeCommand()

ilPageObjectGUI::executeCommand ( )

execute command

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

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

818  : string
819  {
820  $ret = "";
821  $next_class = $this->ctrl->getNextClass($this);
822  if ($next_class !== "") {
823  $this->ctrl->setReturn($this, "edit");
824  }
825  $this->log->debug("next_class: " . $next_class);
826  if ($next_class == "" && $this->ctrl->getCmd() == "edit") {
827  $this->tabs_gui->clearTargets();
828  } else {
829  $this->getTabs();
830  }
831 
832 
833  switch ($next_class) {
834  case 'ilobjectmetadatagui':
835  $this->setBackToEditTabs();
836  $md_gui = new ilObjectMetaDataGUI($this->meta_data_rep_obj, $this->meta_data_type, $this->meta_data_sub_obj_id);
837  if (is_object($this->meta_data_observer_obj)) {
838  $md_gui->addMDObserver(
839  $this->meta_data_observer_obj,
840  $this->meta_data_observer_func,
841  "General"
842  );
843  }
844  // set adv metadata record dobject
845  if ($this->adv_type != "") {
846  $md_gui->setAdvMdRecordObject($this->adv_ref_id, $this->adv_type, $this->adv_subtype);
847  }
848  $this->ctrl->forwardCommand($md_gui);
849  break;
850 
851  case "ileditclipboardgui":
852  $this->setBackToEditTabs();
853  $clip_gui = new ilEditClipboardGUI();
854  $clip_gui->setPageBackTitle($this->page_back_title);
855  $ret = $this->ctrl->forwardCommand($clip_gui);
856  break;
857 
858  // notes
859  case "ilnotegui":
860  case "ilcommentgui":
861  $html = $this->edit();
862  $this->tabs_gui->setTabActive("edit");
863  return $html;
864 
865  case 'ilpublicuserprofilegui':
866  $profile_gui = new ilPublicUserProfileGUI($this->requested_user_id);
867  $ret = $this->ctrl->forwardCommand($profile_gui);
868  break;
869 
870  case "ilpageeditorgui":
871  $this->setEditorToolContext();
872 
873  if (!$this->getEnableEditing()) {
874  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
875  $this->ctrl->redirect($this, "preview");
876  }
877  $page_editor = new ilPageEditorGUI($this->getPageObject(), $this);
878  $page_editor->setHeader($this->getHeader());
879  $page_editor->setPageBackTitle($this->page_back_title);
880  $page_editor->setIntLinkReturn($this->int_link_return);
881  //$page_editor->executeCommand();
882  $ret = $this->ctrl->forwardCommand($page_editor);
883  break;
884 
885  case 'ilnewsitemgui':
886  $news_item_gui = new ilNewsItemGUI();
887  $news_item_gui->setEnableEdit(true);
888  $news_item_gui->setContextObjId($this->news_obj_id);
889  $news_item_gui->setContextObjType($this->news_obj_type);
890  $news_item_gui->setContextSubObjId($this->obj->getId());
891  $news_item_gui->setContextSubObjType("pg");
892 
893  $ret = $this->ctrl->forwardCommand($news_item_gui);
894  break;
895 
896  case "ilpropertyformgui":
897  $form = $this->initOpenedContentForm();
898  $this->ctrl->forwardCommand($form);
899  break;
900 
901  case "ilinternallinkgui":
902  $this->lng->loadLanguageModule("content");
903  $link_gui = new ilInternalLinkGUI("Media_Media", 0);
904 
905  $link_gui->filterLinkType("PageObject_FAQ");
906  $link_gui->filterLinkType("GlossaryItem");
907  $link_gui->filterLinkType("Media_Media");
908  $link_gui->filterLinkType("Media_FAQ");
909 
910  $link_gui->setFilterWhiteList(true);
911  $this->ctrl->forwardCommand($link_gui);
912  break;
913 
914  case "ilquestioneditgui":
915  $this->setQEditTabs("question");
916  $edit_gui = new ilQuestionEditGUI();
917  $edit_gui->setPageConfig($this->getPageConfig());
918  $edit_gui->setSelfAssessmentEditingMode(true);
919  $ret = $this->ctrl->forwardCommand($edit_gui);
920  $this->tpl->setContent($ret);
921  break;
922 
923  case 'ilassquestionfeedbackeditinggui':
924 
926 
927  // set tabs
928  $this->setQEditTabs("feedback");
929 
930  // load required lang mods
931  $this->lng->loadLanguageModule("assessment");
932 
933  // set context tabs
934  $questionGUI = assQuestionGUI::_getQuestionGUI(
935  $this->questioninfo->getGeneralQuestionProperties(
936  $this->requested_q_id
937  )->getClassName(),
939  );
940  $questionGUI->getObject()->setObjId(0);
941  $questionGUI->getObject()->setSelfAssessmentEditingMode(true);
942  $questionGUI->getObject()->setPreventRteUsage($this->getPageConfig()->getPreventRteUsage());
943 
944  // forward to ilAssQuestionFeedbackGUI
945  (new ilQuestionEditGUI())->forwardToFeedbackEditGUI($questionGUI);
946  break;
947 
948 
949  case 'ilLearninghistorygui':
950  $user_id = null;
951  if ($this->getPageObject()->getParentType() == "prtf") {
952  $user_id = ilObject::_lookupOwner($this->getPageObject()->getPortfolioId());
953  }
954  $hist_gui = new ilLearningHistoryGUI();
955  $hist_gui->setUserId($user_id);
956  $this->ctrl->forwardCommand($hist_gui);
957  break;
958 
959  default:
960  $cmd = $this->ctrl->getCmd("preview");
961  // presentation view
962  if ($this->getViewPageLink() != "" && $cmd != "edit") {
963  $this->tabs_gui->addNonTabbedLink(
964  "pres_view",
965  $this->getViewPageText(),
966  $this->getViewPageLink()
967  );
968  }
969  $ret = $this->$cmd();
970  if ($this->getOutputMode() == self::PREVIEW && $cmd == "preview") {
971  $this->showEditToolbar();
972  }
973  break;
974  }
975  //echo "+$ret+";
976  return (string) $ret;
977  }
Class ilObjectMetaDataGUI.
Class ilQuestionEditGUI.
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.
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.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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 3138 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl().

Referenced by releasePageLock().

3138  : void
3139  {
3140  $this->ctrl->redirect($this, "preview");
3141  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAbstractOnly()

ilPageObjectGUI::getAbstractOnly ( )

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

References $abstract_only.

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

714  : bool
715  {
716  return $this->abstract_only;
717  }
+ Here is the caller graph for this function:

◆ getActivationCaptions()

ilPageObjectGUI::getActivationCaptions ( )

Get captions for activation action menu entries.

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

References ILIAS\Repository\lng().

1665  : array
1666  {
1667  return array("deactivatePage" => $this->lng->txt("cont_deactivate_page"),
1668  "activatePage" => $this->lng->txt("cont_activate_page"));
1669  }
+ Here is the call graph for this function:

◆ getActivationFormValues()

ilPageObjectGUI::getActivationFormValues ( )

Get values for activation form.

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

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

Referenced by editActivation().

2860  : void
2861  {
2862  $activation = "deactivated";
2863  if ($this->getPageObject()->getActive()) {
2864  $activation = "activated";
2865  }
2866 
2867  $dt_prop = $this->form->getItemByPostVar("start");
2868  if ($this->getPageObject()->getActivationStart() != "") {
2869  $activation = "scheduled";
2870  $dt_prop->setDate(new ilDateTime(
2871  $this->getPageObject()->getActivationStart(),
2873  ));
2874  }
2875  $dt_prop = $this->form->getItemByPostVar("end");
2876  if ($this->getPageObject()->getActivationEnd() != "") {
2877  $activation = "scheduled";
2878  $dt_prop->setDate(new ilDateTime(
2879  $this->getPageObject()->getActivationEnd(),
2881  ));
2882  }
2883 
2884  $this->form->getItemByPostVar("activation")->setValue($activation);
2885  $this->form->getItemByPostVar("show_activation_info")->setChecked($this->getPageObject()->getShowActivationInfo());
2886  }
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 3178 of file class.ilPageObjectGUI.php.

3178  : array
3179  {
3180  return [];
3181  }

◆ getAdvMdRecordObject()

ilPageObjectGUI::getAdvMdRecordObject ( )

Get adv md record type.

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

References $adv_ref_id, $adv_subtype, $adv_type, and null.

281  : ?array
282  {
283  if ($this->adv_type === null) {
284  return null;
285  }
287  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ getBlockingInfoMessage()

ilPageObjectGUI::getBlockingInfoMessage ( )

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

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

2470  : string
2471  {
2472  $ui = $this->ui;
2473 
2474  $lock = $this->getPageObject()->getEditLockInfo();
2475  $info = $this->lng->txt("cont_got_lock_release");
2476  $info = str_replace("%1", ilDatePresentation::formatDate(new ilDateTime($lock["edit_lock_until"], IL_CAL_UNIX)), $info);
2477 
2478  $mbox = $ui->factory()->messageBox()->info($info);
2479 
2480  return $ui->renderer()->render($mbox);
2481  }
ILIAS DI UIServices $ui
const IL_CAL_UNIX
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
+ Here is the call graph for this function:

◆ getCompareMode()

ilPageObjectGUI::getCompareMode ( )

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

References $compare_mode.

Referenced by showPage().

698  : bool
699  {
700  return $this->compare_mode;
701  }
+ Here is the caller graph for this function:

◆ getComponentPluginsXML()

ilPageObjectGUI::getComponentPluginsXML ( )

Put information about activated plugins into XML.

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

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

Referenced by showPage().

797  : string
798  {
799  $xml = "";
800  if ($this->getOutputMode() == "edit") {
801  foreach ($this->component_factory->getActivePluginsInSlot("pgcp") as $plugin) {
802  if ($plugin->isValidParentType($this->getPageObject()->getParentType())) {
803  $xml .= '<ComponentPlugin Name="' . $plugin->getPluginName() .
804  '" InsertText="' . $plugin->txt(ilPageComponentPlugin::TXT_CMD_INSERT) . '" />';
805  }
806  }
807  }
808  if ($xml != "") {
809  $xml = "<ComponentPlugins>" . $xml . "</ComponentPlugins>";
810  }
811  return $xml;
812  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDisabledText()

ilPageObjectGUI::getDisabledText ( )

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

References ILIAS\Repository\lng().

Referenced by showPage().

729  : string
730  {
731  return $this->lng->txt("inactive");
732  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEditPreview()

ilPageObjectGUI::getEditPreview ( )

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

References $editpreview.

Referenced by getTabs().

615  : bool
616  {
617  return $this->editpreview;
618  }
+ Here is the caller graph for this function:

◆ getEnabledHref()

ilPageObjectGUI::getEnabledHref ( )

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

References $enabled_href.

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

734  : bool
735  {
736  return $this->enabled_href;
737  }
+ Here is the caller graph for this function:

◆ getEnabledNews()

ilPageObjectGUI::getEnabledNews ( )

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

References $enabled_news.

594  : bool
595  {
596  return $this->enabled_news;
597  }

◆ getEnabledPageFocus()

ilPageObjectGUI::getEnabledPageFocus ( )

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

References $enabledpagefocus.

Referenced by showPage().

645  : bool
646  {
648  }
+ Here is the caller graph for this function:

◆ getEnabledTabs()

ilPageObjectGUI::getEnabledTabs ( )

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

References $tabs_enabled.

Referenced by getTabs().

625  : bool
626  {
627  return $this->tabs_enabled;
628  }
+ Here is the caller graph for this function:

◆ getEnableEditing()

ilPageObjectGUI::getEnableEditing ( )

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

References $enableediting.

Referenced by compareVersion(), executeCommand(), history(), initEditing(), ilBlogPostingGUI\preview(), rollback(), rollbackConfirmation(), ilImprintGUI\showEditToolbar(), and showEditToolbar().

665  : bool
666  {
667  return $this->enableediting;
668  }
+ Here is the caller graph for this function:

◆ getEnablePCType()

ilPageObjectGUI::getEnablePCType ( string  $a_pc_type)

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

References getPageConfig().

Referenced by insertResources(), and showPage().

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

◆ getFileDownloadLink()

ilPageObjectGUI::getFileDownloadLink ( )

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

References $file_download_link.

Referenced by determineFileDownloadLink().

507  : string
508  {
510  }
+ Here is the caller graph for this function:

◆ getFullscreenLink()

ilPageObjectGUI::getFullscreenLink ( )

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

References $fullscreen_link.

Referenced by determineFullscreenLink().

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

◆ getHeader()

ilPageObjectGUI::getHeader ( )

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

References $header.

Referenced by executeCommand().

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

◆ getHTML()

ilPageObjectGUI::getHTML ( )

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

References getTabs(), and showPage().

2499  : string
2500  {
2501  $this->getTabs("preview");
2502  return $this->showPage();
2503  }
getTabs(string $a_activate="")
showPage()
display content of page
+ Here is the call graph for this function:

◆ getId()

◆ getLanguage()

ilPageObjectGUI::getLanguage ( )

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

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

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

342  : string
343  {
344  if ($this->language == "") {
345  return "-";
346  }
347 
348  return $this->language;
349  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLinkFrame()

ilPageObjectGUI::getLinkFrame ( )

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

References $link_frame.

442  : string
443  {
444  return $this->link_frame;
445  }

◆ getLinkParams()

ilPageObjectGUI::getLinkParams ( )

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

References $link_params.

432  : string
433  {
434  return $this->link_params;
435  }

◆ getLinkXML()

ilPageObjectGUI::getLinkXML ( )

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

References $link_xml.

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

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

◆ getMetaDataLink()

ilPageObjectGUI::getMetaDataLink ( )

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

2671  : string
2672  {
2673  $mdtab = "";
2674  if ($this->use_meta_data) {
2675  $mdgui = new ilObjectMetaDataGUI(
2676  $this->meta_data_rep_obj,
2677  $this->meta_data_type,
2678  $this->meta_data_sub_obj_id
2679  );
2680  $mdtab = $mdgui->getTab();
2681  if ($mdtab) {
2682  $this->tabs_gui->addTarget(
2683  "meta_data",
2684  $mdtab,
2685  "",
2686  "ilobjectmetadatagui"
2687  );
2688  }
2689  }
2690  return (string) $mdtab;
2691  }
Class ilObjectMetaDataGUI.

◆ 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 2926 of file class.ilPageObjectGUI.php.

References ILIAS\Repository\ctrl().

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

2933  : string {
2934  // scorm 2004 page gui
2935  if (!$a_content_object) {
2936  throw new ilException("No content object given.");
2937  /*
2938  $notes_gui = new ilNoteGUI(
2939  $this->notes_parent_id,
2940  $this->obj->getId(),
2941  "pg"
2942  );
2943 
2944  $a_enable_private_notes = true;
2945  $a_enable_public_notes = true;
2946  $a_enable_notes_deletion = false;
2947  $notes_gui->setUseObjectTitleHeader(false);*/
2948  }
2949  // wiki page gui, blog posting gui
2950  else {
2951  /*
2952  $notes_gui = new ilNoteGUI(
2953  $a_content_object->getParentId(),
2954  $a_content_object->getId(),
2955  $a_content_object->getParentType()
2956  );*/
2957  $comments_gui = $this->notes->gui()->getCommentsGUI(
2958  $a_content_object->getParentId(),
2959  $a_content_object->getId(),
2960  $a_content_object->getParentType()
2961  );
2962  $comments_gui->setUseObjectTitleHeader(false);
2963  }
2964 
2965  if ($a_enable_private_notes) {
2966  $comments_gui->enablePrivateNotes();
2967  }
2968  if ($a_enable_public_notes) {
2969  $comments_gui->enablePublicNotes();
2970  if ($a_enable_notes_deletion) {
2971  $comments_gui->enablePublicNotesDeletion(true);
2972  }
2973  }
2974  if ($export) {
2975  $comments_gui->setExportMode();
2976  }
2977 
2978  if ($a_callback) {
2979  $comments_gui->addObserver($a_callback);
2980  }
2981 
2982  $next_class = $this->ctrl->getNextClass($this);
2983  if (in_array($next_class, ["ilnotegui", "ilcommentgui"])) {
2984  $html = $this->ctrl->forwardCommand($comments_gui);
2985  } else {
2986  $html = $comments_gui->getListHTML();
2987  }
2988  return $html;
2989  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOfflineDirectory()

ilPageObjectGUI::getOfflineDirectory ( )

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

References $offline_directory.

546  : string
547  {
549  }

◆ getOldNr()

ilPageObjectGUI::getOldNr ( )

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

References $old_nr.

Referenced by initPageObject().

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

◆ getOpenPlaceHolder()

ilPageObjectGUI::getOpenPlaceHolder ( )

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

References $open_place_holder.

Referenced by showPage().

640  : string
641  {
643  }
+ Here is the caller graph for this function:

◆ getOutputMode()

◆ getPageConfig()

ilPageObjectGUI::getPageConfig ( )

◆ getPageObject()

ilPageObjectGUI::getPageObject ( )

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

References $obj.

Referenced by ilMediaPoolPageGUI\__construct(), ilTermDefinitionEditorGUI\__construct(), ilLMPageGUI\__construct(), ilPortfolioPageGUI\__construct(), ilWikiPageGUI\__construct(), __construct(), activatePage(), ilWikiPageGUI\activateWikiPageRating(), ilWikiPageGUI\addHeaderAction(), addResourcesToTemplate(), ilDashboardPageGUI\afterConstructor(), ilContainerPageGUI\afterDeleteContents(), ilWikiPageGUI\blockWikiPage(), checkLangPageAvailable(), compareVersion(), ilWikiPageGUI\confirmWikiPageDeletion(), ilWikiPageGUI\createPageTranslation(), createPageTranslation(), deactivatePage(), ilWikiPageGUI\deactivateWikiPageRating(), ilWikiPageGUI\deleteWikiPageConfirmationScreen(), displayMedia(), download_paragraph(), downloadFile(), ilContainerPageGUI\edit(), ilDashboardPageGUI\executeCommand(), ilDclDetailedViewDefinitionGUI\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().

378  : ilPageObject
379  {
380  return $this->obj;
381  }
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 3150 of file class.ilPageObjectGUI.php.

Referenced by showPage().

3150  : string
3151  {
3152  return "";
3153  }
+ Here is the caller graph for this function:

◆ getParentType()

ilPageObjectGUI::getParentType ( )

◆ getPrependingHtml()

ilPageObjectGUI::getPrependingHtml ( )

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

References $prependinghtml.

Referenced by showPage().

655  : string
656  {
657  return $this->prependinghtml;
658  }
+ Here is the caller graph for this function:

◆ getPresentationTitle()

ilPageObjectGUI::getPresentationTitle ( )

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

References $presentation_title.

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

412  : string
413  {
415  }
+ Here is the caller graph for this function:

◆ getProfileBackUrl()

ilPageObjectGUI::getProfileBackUrl ( )

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

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

Referenced by setDefaultLinkXml(), and showPage().

2084  : string
2085  {
2086  if ($this->profile_back_url != "") {
2087  return $this->profile_back_url;
2088  }
2089  if ($this->getOutputMode() === self::OFFLINE ||
2090  $this->getOutputMode() === self::PRINTING) {
2091  return "";
2092  }
2093  return $this->ctrl->getLinkTargetByClass(strtolower(get_class($this)), "preview");
2094  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getQuestionHTML()

ilPageObjectGUI::getQuestionHTML ( )

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

References getPageConfig().

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

◆ getRawPageContent()

ilPageObjectGUI::getRawPageContent ( )

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

References $rawpagecontent.

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

678  : bool
679  {
680  return $this->rawpagecontent;
681  }
+ Here is the caller graph for this function:

◆ getRenderPageContainer()

ilPageObjectGUI::getRenderPageContainer ( )

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

References $render_page_container.

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

724  : bool
725  {
727  }
+ Here is the caller graph for this function:

◆ getSourcecodeDownloadScript()

ilPageObjectGUI::getSourcecodeDownloadScript ( )

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

References $sourcecode_download_script.

487  : string
488  {
490  }

◆ getStyleId()

◆ getTabs()

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

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

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

Referenced by executeCommand(), and getHTML().

2693  : void
2694  {
2695  if (in_array($this->getOutputMode(), [self::OFFLINE])) {
2696  return;
2697  }
2698  $this->setScreenIdComponent();
2699 
2700  if (!$this->getEnabledTabs()) {
2701  return;
2702  }
2703 
2704  // back to upper context
2705  if (!$this->getEditPreview()) {
2706  $this->tabs_gui->addTarget("pg", $this->ctrl->getLinkTarget($this, "preview"), array("", "preview"));
2707  } else {
2708  $this->tabs_gui->addTarget("cont_preview", $this->ctrl->getLinkTarget($this, "preview"), array("", "preview"));
2709  }
2710 
2711  if ($this->use_meta_data) {
2712  $mdgui = new ilObjectMetaDataGUI(
2713  $this->meta_data_rep_obj,
2714  $this->meta_data_type,
2715  $this->meta_data_sub_obj_id
2716  );
2717  $mdtab = $mdgui->getTab();
2718  if ($mdtab) {
2719  $this->tabs_gui->addTarget(
2720  "meta_data",
2721  $mdtab,
2722  "",
2723  "ilobjectmetadatagui"
2724  );
2725  }
2726  }
2727 
2728  $lm_set = new ilSetting("lm");
2729 
2730  // external hook to add tabs
2731  if (is_array($this->tab_hook)) {
2732  $func = $this->tab_hook["func"];
2733  $this->tab_hook["obj"]->$func();
2734  }
2735  }
Class ilObjectMetaDataGUI.
$lm_set
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTemplateOutputVar()

ilPageObjectGUI::getTemplateOutputVar ( )

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

References $template_output_var.

Referenced by showPage().

477  : string
478  {
480  }
+ Here is the caller graph for this function:

◆ getTemplateTargetVar()

ilPageObjectGUI::getTemplateTargetVar ( )

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

References $target_var.

Referenced by showPage().

472  : string
473  {
474  return $this->target_var;
475  }
+ 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 1708 of file class.ilPageObjectGUI.php.

References Vendor\Package\$b, $c, $DIC, Vendor\Package\$f, ilPCListGUI\_getListCharacteristics(), ilUtil\getImagePath(), ilCtrl\getLinkTargetByClass(), ilLanguage\loadLanguageModule(), ilPageEditorSettings\lookupSettingByParentType(), null, and ilLanguage\txt().

Referenced by ilPCParagraphEditorGUI\getEditorElements().

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

◆ getViewPageLink()

ilPageObjectGUI::getViewPageLink ( )

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

References $view_page_link.

Referenced by executeCommand().

561  : string
562  {
563  return $this->view_page_link;
564  }
+ Here is the caller graph for this function:

◆ getViewPageTarget()

ilPageObjectGUI::getViewPageTarget ( )

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

References $view_page_target.

566  : string
567  {
569  }

◆ getViewPageText()

ilPageObjectGUI::getViewPageText ( )

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

References ILIAS\Repository\lng().

Referenced by executeCommand().

571  : string
572  {
573  return $this->lng->txt("cont_presentation_view");
574  }
+ 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 2590 of file class.ilPageObjectGUI.php.

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

2590  : string
2591  {
2592  if (!$this->getEnableEditing()) {
2593  return "";
2594  }
2595 
2596  $this->setBackToEditTabs();
2597 
2598  $this->tpl->addJavaScript("assets/js/page_history.js");
2599 
2600  $table_gui = new ilPageHistoryTableGUI($this, "history");
2601  $table_gui->setId("hist_table");
2602  $entries = $this->getPageObject()->getHistoryEntries();
2603  $entries[] = array('page_id' => $this->getPageObject()->getId(),
2604  'parent_type' => $this->getPageObject()->getParentType(),
2605  'hdate' => $this->getPageObject()->getLastChange(),
2606  'parent_id' => $this->getPageObject()->getParentId(),
2607  'nr' => 0,
2608  'sortkey' => 999999,
2609  'user' => $this->getPageObject()->last_change_user);
2610  $table_gui->setData($entries);
2611  return $table_gui->getHTML();
2612  }
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 2820 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().

2820  : void
2821  {
2822  $this->form = new ilPropertyFormGUI();
2823  $this->form->setFormAction($this->ctrl->getFormAction($this));
2824  $this->form->setTitle($this->lng->txt("cont_page_activation"));
2825 
2826  // activation type radio
2827  $rad = new ilRadioGroupInputGUI($this->lng->txt("cont_activation"), "activation");
2828  $rad_op1 = new ilRadioOption($this->lng->txt("cont_activated"), "activated");
2829 
2830  $rad->addOption($rad_op1);
2831  $rad_op2 = new ilRadioOption($this->lng->txt("cont_deactivated"), "deactivated");
2832  $rad->addOption($rad_op2);
2833  $rad_op3 = new ilRadioOption($this->lng->txt("cont_scheduled_activation"), "scheduled");
2834 
2835  $dt_prop = new ilDateTimeInputGUI($this->lng->txt("cont_start"), "start");
2836  $dt_prop->setRequired(true);
2837  $dt_prop->setShowTime(true);
2838  $rad_op3->addSubItem($dt_prop);
2839  $dt_prop2 = new ilDateTimeInputGUI($this->lng->txt("cont_end"), "end");
2840  $dt_prop2->setRequired(true);
2841  $dt_prop2->setShowTime(true);
2842  $rad_op3->addSubItem($dt_prop2);
2843 
2844  // show activation information
2845  $cb = new ilCheckboxInputGUI($this->lng->txt("cont_show_activation_info"), "show_activation_info");
2846  $cb->setInfo($this->lng->txt("cont_show_activation_info_info"));
2847  $rad_op3->addSubItem($cb);
2848 
2849 
2850  $rad->addOption($rad_op3);
2851 
2852  $this->form->addCommandButton("saveActivation", $this->lng->txt("save"));
2853 
2854  $this->form->addItem($rad);
2855  }
This class represents an option in a radio group.
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 2385 of file class.ilPageObjectGUI.php.

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

Referenced by showPage().

2385  : void
2386  {
2387  // editing allowed?
2388  if (!$this->getEnableEditing()) {
2389  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
2390  $this->ctrl->redirect($this, "preview");
2391  }
2392 
2393  // not so nive workaround for container pages, bug #0015831
2394  $ptype = $this->getParentType();
2395  if ($ptype == "cont" && $this->requested_ref_id > 0) {
2396  $ptype = ilObject::_lookupType($this->requested_ref_id, true);
2397  }
2398  $this->setScreenIdComponent();
2399  $this->help->setScreenId("edit_" . $ptype);
2400 
2401  // edit lock
2402  if (!$this->getPageObject()->getEditLock()) {
2403  $this->showEditLockInfo();
2404  return;
2405  } else {
2406  $this->setEditorToolContext();
2407  }
2408 
2409  $this->lng->toJS("paste");
2410  $this->lng->toJS("delete");
2411  $this->lng->toJS("cont_delete_content");
2412  $this->lng->toJS("copg_confirm_el_deletion");
2413  $this->lng->toJS("cont_saving");
2414  $this->lng->toJS("cont_ed_par");
2415  $this->lng->toJS("cont_no_block");
2416  $this->lng->toJS("copg_error");
2417  $this->lng->toJS("cont_ed_click_to_add_pg");
2418  $this->lng->toJS("cont_ed_new_item_after");
2419  $this->lng->toJS("cont_ed_new_item_before");
2420  $this->lng->toJS("cont_ed_item_up");
2421  $this->lng->toJS("cont_ed_item_down");
2422  $this->lng->toJS("cont_ed_delete_item");
2423  $this->lng->toJS("copg_edit_iframe_title");
2424  $this->lng->toJS("copg_par_format_selection");
2425  // workaroun: we need this js for the new editor version, e.g. for new section form to work
2426  // @todo: solve this in a smarter way
2427  $this->tpl->addJavaScript("assets/js/AdvancedSelectionList.js");
2429  // ilModalGUI::initJS(); // due to permission repo picker in sections, waits for new tree/repo picker
2430  }
setEditorToolContext()
Set editor tool context.
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 3013 of file class.ilPageObjectGUI.php.

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

3013  : void
3014  {
3015  $this->tabs_gui->activateTab("edit");
3016  $form = $this->initOpenedContentForm();
3017  $this->tpl->setContent($form->getHTML());
3018  }
ilPropertyFormGUI $form
+ Here is the call graph for this function:

◆ initOpenedContentForm()

ilPageObjectGUI::initOpenedContentForm ( )

Definition at line 3020 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().

3021  {
3022  $form = new ilPropertyFormGUI();
3023 
3024  // link input
3025  $ac = new ilLinkInputGUI($this->lng->txt('cont_resource'), 'opened_content');
3027  $ac->setInternalLinkDefault("Media_Media", 0);
3028  $ac->setInternalLinkFilterTypes(array("PageObject_FAQ", "GlossaryItem", "Media_Media", "Media_FAQ"));
3029  $val = $this->obj->getInitialOpenedContent();
3030  if (($val["id"] ?? '') != "" && ($val["type"] ?? '') != "") {
3031  $ac->setValue($val["type"] . "|" . $val["id"] . "|" . $val["target"]);
3032  }
3033 
3034  $form->addItem($ac);
3035 
3036  $form->addCommandButton("saveInitialOpenedContent", $this->lng->txt("save"));
3037  $form->addCommandButton("edit", $this->lng->txt("cancel"));
3038  $form->setTitle($this->lng->txt("cont_initial_attached_content"));
3039  $form->setFormAction($this->ctrl->getFormAction($this));
3040 
3041  return $form;
3042  }
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 292 of file class.ilPageObjectGUI.php.

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

Referenced by __construct().

292  : void
293  {
295  $this->getParentType(),
296  $this->getId(),
297  $this->getOldNr(),
298  $this->getLanguage()
299  );
300  $page->setConcreteLang($this->concrete_lang);
301  $this->setPageObject($page);
302  }
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 2313 of file class.ilPageObjectGUI.php.

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

Referenced by showPage().

2313  : string
2314  {
2315  if (!$this->getAbstractOnly()) {
2316  $a_output = str_replace(
2317  "{{{{{LV_show_adv}}}}}",
2318  $this->lng->txt("cont_show_adv"),
2319  $a_output
2320  );
2321  $a_output = str_replace(
2322  "{{{{{LV_hide_adv}}}}}",
2323  $this->lng->txt("cont_hide_adv"),
2324  $a_output
2325  );
2326  } else {
2327  $a_output = str_replace(
2328  "{{{{{LV_show_adv}}}}}",
2329  "",
2330  $a_output
2331  );
2332  $a_output = str_replace(
2333  "{{{{{LV_hide_adv}}}}}",
2334  "",
2335  $a_output
2336  );
2337  }
2338 
2339  return $a_output;
2340  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insertJSAtPlaceholder()

ilPageObjectGUI::insertJSAtPlaceholder ( )

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

References edit(), and setOpenPlaceHolder().

2483  : string
2484  {
2485  $pl_pc_id = $this->request->getPlaceholderPCId();
2486  $this->obj->buildDom();
2487  $this->obj->addHierIDs();
2488  $this->setOpenPlaceHolder($pl_pc_id);
2489  return $this->edit();
2490  }
setOpenPlaceHolder(string $a_val)
+ Here is the call graph for this function:

◆ insertPageToc()

ilPageObjectGUI::insertPageToc ( string  $a_output)

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

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

Referenced by showPage().

2188  : string
2189  {
2190  // extract all headings
2191  $offsets = [];
2192  $cpos = 0;
2193  while (is_int($pos = strpos($a_output, "ilPageTocH", $cpos))) {
2194  $offsets[] = $pos;
2195  $cpos = $pos + 1;
2196  }
2197 
2198  $page_heads = array();
2199  foreach ($offsets as $os) {
2200  $level = (int) substr($a_output, $os + 10, 1);
2201  if (in_array($level, array(1,2,3))) {
2202  $anchor = str_replace(
2203  "TocH",
2204  "TocA",
2205  substr($a_output, $os, strpos($a_output, "-->", $os) - $os)
2206  );
2207 
2208  // get heading
2209  $tag_start = stripos($a_output, "<h" . $level . " ", $os);
2210  $tag_end = stripos($a_output, "</h" . $level . ">", $tag_start);
2211  $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2212 
2213  // get headings text
2214  $text_start = stripos($head, ">") + 1;
2215  $text_end = strripos($head, "<!--", $text_start);
2216  $text = substr($head, $text_start, $text_end - $text_start);
2217  $page_heads[] = array("level" => $level, "text" => $text,
2218  "anchor" => $anchor);
2219  }
2220  }
2221  if (count($page_heads) > 1) {
2222  $listing = $this->gui->listing();
2223  // todo: inject?
2224  /*$list->setListClass("ilc_page_toc_PageTOCList");
2225  $list->setItemClass("ilc_page_toc_PageTOCItem");*/
2226  $i = 0;
2227  $c_depth = 1;
2228  $c_par[1] = 0;
2229  $c_par[2] = 0;
2230  $page_toc_ph = "<!--PageTocPH-->";
2231  foreach ($page_heads as $ind => $h) {
2232  $i++;
2233  $par = 0;
2234 
2235  // check if we have a parent for one level up
2236  $par = 0;
2237  if ($h["level"] == 2 && $c_par[1] > 0) {
2238  $par = $c_par[1];
2239  }
2240  if ($h["level"] == 3 && $c_par[2] > 0) {
2241  $par = $c_par[2];
2242  }
2243 
2244  $h["text"] = str_replace($page_toc_ph, "", $h["text"]);
2245 
2246  $listing->node(
2247  $this->ui->factory()->legacy()->content("<a href='#" . $h["anchor"] . "' class='ilc_page_toc_PageTOCLink'>" . $h["text"] . "</a>"),
2248  (string) $i,
2249  (string) ($par)
2250  );
2251 
2252  // set the node as current parent of the level
2253  if ($h["level"] == 1) {
2254  $c_par[1] = $i;
2255  $c_par[2] = 0;
2256  }
2257  if ($h["level"] == 2) {
2258  $c_par[2] = $i;
2259  }
2260  }
2261 
2262  $tpl = new ilTemplate(
2263  "tpl.page_toc.html",
2264  true,
2265  true,
2266  "components/ILIAS/COPage"
2267  );
2268  $tpl->setVariable("PAGE_TOC", $listing->autoNumbers(true)->render());
2269  $tpl->setVariable("TXT_PAGE_TOC", $this->lng->txt("cont_page_toc"));
2270  $tpl->setVariable("TXT_HIDE", $this->lng->txt("hide"));
2271  $tpl->setVariable("TXT_SHOW", $this->lng->txt("show"));
2272 
2273  $a_output = str_replace(
2274  "{{{{{PageTOC}}}}}",
2275  $tpl->get(),
2276  $a_output
2277  );
2278  $numbers = $listing->getNumbers();
2279 
2280  if (count($numbers) > 0) {
2281  foreach ($numbers as $n) {
2282  $a_output = (strpos($a_output, $page_toc_ph) !== false)
2283  ? substr_replace($a_output, $n . " ", strpos($a_output, $page_toc_ph), strlen($page_toc_ph))
2284  : $a_output;
2285  }
2286  }
2287  } else {
2288  $a_output = str_replace(
2289  "{{{{{PageTOC}}}}}",
2290  "",
2291  $a_output
2292  );
2293  }
2294 
2295  return $a_output;
2296  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
ilGlobalTemplateInterface $tpl
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
+ 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 2298 of file class.ilPageObjectGUI.php.

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

Referenced by showPage().

2298  : string
2299  {
2300  // this is edit mode only
2301  if ($this->getEnablePCType("Resources") &&
2302  ($this->getOutputMode() == "edit" || $this->getOutputMode() == "preview")) {
2303  $a_output = ilPCResourcesGUI::insertResourcesIntoPageContent($a_output);
2304  }
2305  return $a_output;
2306  }
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:

◆ isEnabledNotes()

ilPageObjectGUI::isEnabledNotes ( )

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

References $notes_enabled.

Referenced by edit().

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

◆ isPageContainerToBeRendered()

ilPageObjectGUI::isPageContainerToBeRendered ( )
protected

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

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

Referenced by showPage().

3143  : bool
3144  {
3145  return (
3146  $this->getRenderPageContainer() || ($this->getOutputMode() == self::PREVIEW && $this->getPageConfig()->getUsePageContainer())
3147  );
3148  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onFeedbackEditingForwarding()

ilPageObjectGUI::onFeedbackEditingForwarding ( )

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

Referenced by executeCommand().

1008  : void
1009  {
1010  }
+ Here is the caller graph for this function:

◆ outputToTemplate()

ilPageObjectGUI::outputToTemplate ( )

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

References $output2template.

Referenced by showPage().

402  : bool
403  {
404  return $this->output2template;
405  }
+ 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 2347 of file class.ilPageObjectGUI.php.

Referenced by showPage().

2347  : string
2348  {
2349  return $a_output;
2350  }
+ Here is the caller graph for this function:

◆ presentation()

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

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

References setOutputMode(), and showPage().

2492  : string
2493  {
2494  $this->setOutputMode($a_mode);
2495 
2496  return $this->showPage();
2497  }
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 2361 of file class.ilPageObjectGUI.php.

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

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

2361  : string
2362  {
2363  if ($this->requested_history_mode) {
2364  $this->setBackToHistoryTabs();
2365  } else {
2366  $this->tabs_gui->activateTab("cont_preview");
2367  }
2368  $this->setOutputMode(self::PREVIEW);
2369  return $this->showPage();
2370  }
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 2356 of file class.ilPageObjectGUI.php.

References preview().

2356  : void
2357  {
2358  $this->preview();
2359  }
+ Here is the call graph for this function:

◆ processAnswer()

ilPageObjectGUI::processAnswer ( )

Process answer.

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

References ilPageQuestionProcessor\saveQuestionAnswer().

2994  : void
2995  {
2997  $this->request->getString("type"),
2998  $this->request->getString("id"),
2999  $this->request->getString("answer")
3000  );
3001  }
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 3131 of file class.ilPageObjectGUI.php.

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

3131  : void
3132  {
3133  $this->getPageObject()->releasePageLock();
3134  $this->tpl->setOnScreenMessage('success', $this->lng->txt("cont_page_lock_released"), true);
3135  $this->finishEditing();
3136  }
+ Here is the call graph for this function:

◆ replaceCurlyBrackets()

ilPageObjectGUI::replaceCurlyBrackets ( string  $output)

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

Referenced by showPage().

1641  : string
1642  {
1643  //echo "<br><br>".htmlentities($output);
1644 
1645  while (is_int($start = strpos($output, "<!--ParStart-->")) &&
1646  is_int($end = strpos($output, "<!--ParEnd-->", $start))) {
1647  $output = substr($output, 0, $start) .
1648  str_replace(
1649  array("{","}"),
1650  array("&#123;","&#125;"),
1651  substr($output, $start + 15, $end - ($start + 15))
1652  ) .
1653  substr($output, $end + 13);
1654  }
1655 
1656  // $output = str_replace("{", "&#123;", $output);
1657  // $output = str_replace("}", "&#125;", $output);
1658  //echo "<br><br>".htmlentities($output);
1659  return $output;
1660  }
+ Here is the caller graph for this function:

◆ replaceDiffTags()

ilPageObjectGUI::replaceDiffTags ( string  $a_html)

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

Referenced by compareVersion().

2793  : string
2794  {
2795  $a_html = str_replace("[ilDiffInsStart]", '<span class="ilDiffIns">', $a_html);
2796  $a_html = str_replace("[ilDiffDelStart]", '<span class="ilDiffDel">', $a_html);
2797  $a_html = str_replace("[ilDiffInsEnd]", '</span>', $a_html);
2798  $a_html = str_replace("[ilDiffDelEnd]", '</span>', $a_html);
2799 
2800  return $a_html;
2801  }
+ Here is the caller graph for this function:

◆ rollback()

ilPageObjectGUI::rollback ( )

Rollback to a previous version.

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

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

2646  : void
2647  {
2648  if (!$this->getEnableEditing()) {
2649  return;
2650  }
2651 
2652  $hentry = $this->obj->getHistoryEntry(
2653  $this->request->getString("rollback_nr")
2654  );
2655 
2656  if ($hentry["content"] != "") {
2657  $this->obj->setXMLContent($hentry["content"]);
2658  $this->obj->buildDom(true);
2659  if ($this->obj->update()) {
2660  $this->ctrl->redirect($this, "history");
2661  }
2662  }
2663  $this->ctrl->redirect($this, "history");
2664  }
+ Here is the call graph for this function:

◆ rollbackConfirmation()

ilPageObjectGUI::rollbackConfirmation ( )

Rollback confirmation.

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

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

2617  : void
2618  {
2619  if (!$this->getEnableEditing()) {
2620  return;
2621  }
2622 
2623  $c_gui = new ilConfirmationGUI();
2624 
2625  // set confirm/cancel commands
2626  $this->ctrl->setParameter($this, "rollback_nr", $this->requested_old_nr);
2627  $c_gui->setFormAction($this->ctrl->getFormAction($this, "rollback"));
2628  $c_gui->setHeaderText($this->lng->txt("cont_rollback_confirmation"));
2629  $c_gui->setCancel($this->lng->txt("cancel"), "history");
2630  $c_gui->setConfirm($this->lng->txt("confirm"), "rollback");
2631 
2632  $hentry = $this->obj->getHistoryEntry($this->requested_old_nr);
2633 
2634  $c_gui->addItem(
2635  "id[]",
2636  $this->requested_old_nr,
2638  );
2639 
2640  $this->tpl->setContent($c_gui->getHTML());
2641  }
const IL_CAL_DATETIME
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
+ Here is the call graph for this function:

◆ saveActivation()

ilPageObjectGUI::saveActivation ( )

Save Activation.

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

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

2891  : void
2892  {
2893  $this->initActivationForm();
2894 
2895  if ($this->form->checkInput()) {
2896  $this->getPageObject()->setActive(true);
2897  $this->getPageObject()->setActivationStart(null);
2898  $this->getPageObject()->setActivationEnd(null);
2899  $this->getPageObject()->setShowActivationInfo(
2900  $this->request->getString("show_activation_info")
2901  );
2902  $activation = $this->request->getString("activation");
2903  if ($activation == "deactivated") {
2904  $this->getPageObject()->setActive(false);
2905  }
2906  if ($activation == "scheduled") {
2907  $this->getPageObject()->setActive(false);
2908  $this->getPageObject()->setActivationStart(
2909  $this->form->getItemByPostVar("start")->getDate()->get(IL_CAL_DATETIME)
2910  );
2911  $this->getPageObject()->setActivationEnd(
2912  $this->form->getItemByPostVar("end")->getDate()->get(IL_CAL_DATETIME)
2913  );
2914  }
2915  $this->getPageObject()->update();
2916  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
2917  $this->ctrl->redirect($this, "editActivation");
2918  }
2919  $this->form->setValuesByPost();
2920  $this->tpl->setContent($this->form->getHTML());
2921  }
initActivationForm()
Init activation form.
const IL_CAL_DATETIME
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ saveInitialOpenedContent()

ilPageObjectGUI::saveInitialOpenedContent ( )

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

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

3044  : void
3045  {
3046  $this->obj->saveInitialOpenedContent(
3047  $this->request->getString("opened_content_ajax_type"),
3048  $this->request->getInt("opened_content_ajax_id"),
3049  $this->request->getString("opened_content_ajax_target")
3050  );
3051 
3052  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"));
3053  $this->ctrl->redirect($this, "edit");
3054  }
+ 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 706 of file class.ilPageObjectGUI.php.

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

709  : void {
710  $this->abstract_only = $a_val;
711  $this->abstract_pcid = $pcid;
712  }
+ Here is the caller graph for this function:

◆ setActivationListener()

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

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

579  : void {
580  $this->act_obj = $a_obj;
581  $this->act_meth = $a_meth;
582  }

◆ 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 268 of file class.ilPageObjectGUI.php.

Referenced by ilObjMediaPoolGUI\executeCommand().

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

◆ setBackToEditTabs()

ilPageObjectGUI::setBackToEditTabs ( )
protected

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

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

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

2569  : void
2570  {
2571  $this->tabs_gui->clearTargets();
2572  $this->tabs_gui->setBackTarget(
2573  $this->lng->txt("back"),
2574  $this->ctrl->getLinkTarget($this, "edit")
2575  );
2576  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBackToHistoryTabs()

ilPageObjectGUI::setBackToHistoryTabs ( )
protected

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

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

Referenced by compareVersion(), and preview().

2578  : void
2579  {
2580  $this->tabs_gui->clearTargets();
2581  $this->tabs_gui->setBackTarget(
2582  $this->lng->txt("back"),
2583  $this->ctrl->getLinkTarget($this, "history")
2584  );
2585  }
+ 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 693 of file class.ilPageObjectGUI.php.

Referenced by compareVersion().

693  : void
694  {
695  $this->compare_mode = $a_val;
696  }
+ Here is the caller graph for this function:

◆ setDefaultLinkXml()

ilPageObjectGUI::setDefaultLinkXml ( )

Definition at line 2070 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().

2070  : void
2071  {
2072  $this->page_linker->setProfileBackUrl($this->getProfileBackUrl());
2073  $this->page_linker->setOffline($this->getOutputMode() == self::OFFLINE);
2074  $this->setLinkXml($this->page_linker->getLinkXML($this->getPageObject()->getInternalLinks()));
2075  }
+ 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 1674 of file class.ilPageObjectGUI.php.

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

1674  : void
1675  {
1676  $media_mode = $this->request->getString("media_mode");
1677  $html_mode = $this->request->getString("html_mode");
1678  $js_mode = $this->request->getString("js_mode");
1679  if ($media_mode != "") {
1680  if ($media_mode == "disable") {
1681  $this->user->writePref("ilPageEditor_MediaMode", "disable");
1682  } else {
1683  $this->user->writePref("ilPageEditor_MediaMode", "");
1684  }
1685  }
1686  if ($html_mode != "") {
1687  if ($html_mode == "disable") {
1688  $this->user->writePref("ilPageEditor_HTMLMode", "disable");
1689  } else {
1690  $this->user->writePref("ilPageEditor_HTMLMode", "");
1691  }
1692  }
1693  if ($js_mode != "") {
1694  if ($js_mode == "disable") {
1695  $this->user->writePref("ilPageEditor_JavaScript", "disable");
1696  } else {
1697  $this->user->writePref("ilPageEditor_JavaScript", "");
1698  }
1699  }
1700 
1701  $this->ctrl->redirect($this, "edit");
1702  }
+ Here is the call graph for this function:

◆ setEditorToolContext()

ilPageObjectGUI::setEditorToolContext ( )
protected

Set editor tool context.

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

References ilCOPageEditGSToolProvider\SHOW_EDITOR.

Referenced by executeCommand(), and initEditing().

2375  : void
2376  {
2377  $collection = $this->tool_context->current()->getAdditionalData();
2378  if ($collection->exists(ilCOPageEditGSToolProvider::SHOW_EDITOR)) {
2379  $collection->replace(ilCOPageEditGSToolProvider::SHOW_EDITOR, true);
2380  } else {
2381  $collection->add(ilCOPageEditGSToolProvider::SHOW_EDITOR, true);
2382  }
2383  }
+ 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 609 of file class.ilPageObjectGUI.php.

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

611  : void {
612  $this->editpreview = $a_editpreview;
613  }
+ Here is the caller graph for this function:

◆ setEnabledHref()

ilPageObjectGUI::setEnabledHref ( bool  $enable)

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

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

739  : void
740  {
741  $this->enabled_href = $enable;
742  }
+ 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 584 of file class.ilPageObjectGUI.php.

588  : void {
589  $this->enabled_news = $a_enabled;
590  $this->news_obj_id = $a_news_obj_id;
591  $this->news_obj_type = $a_news_obj_type;
592  }

◆ setEnabledPageFocus()

ilPageObjectGUI::setEnabledPageFocus ( bool  $a_enabledpagefocus)

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

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

630  : void
631  {
632  $this->enabledpagefocus = $a_enabledpagefocus;
633  }
+ Here is the caller graph for this function:

◆ setEnabledTabs()

ilPageObjectGUI::setEnabledTabs ( bool  $a_enabledtabs)

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

620  : void
621  {
622  $this->tabs_enabled = $a_enabledtabs;
623  }

◆ setEnableEditing()

ilPageObjectGUI::setEnableEditing ( bool  $a_enableediting)

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

Referenced by ilBlogPostingGUI\__construct().

660  : void
661  {
662  $this->enableediting = $a_enableediting;
663  }
+ Here is the caller graph for this function:

◆ setEnablePCType()

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

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

References getPageConfig().

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

◆ setFileDownloadLink()

ilPageObjectGUI::setFileDownloadLink ( string  $a_download_link)

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

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

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

◆ setFullscreenLink()

ilPageObjectGUI::setFullscreenLink ( string  $a_fullscreen_link)

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

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

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

◆ setHeader()

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

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

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

417  : void
418  {
419  $this->header = $a_title;
420  }
header()
expected output: > ILIAS shows the rendered Component.
Definition: header.php:29
+ Here is the call graph for this function:

◆ setId()

ilPageObjectGUI::setId ( int  $a_val)

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

Referenced by __construct().

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

◆ setIntLinkReturn()

ilPageObjectGUI::setIntLinkReturn ( string  $a_return)

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

522  : void
523  {
524  $this->int_link_return = $a_return;
525  }

◆ setLanguage()

ilPageObjectGUI::setLanguage ( string  $a_val)

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

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

Referenced by __construct().

337  : void
338  {
339  $this->language = $a_val;
340  }
language()
description: > Example for rendring a language glyph.
Definition: language.php:41
+ 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 437 of file class.ilPageObjectGUI.php.

437  : void
438  {
439  $this->link_frame = $l_frame;
440  }

◆ setLinkParams()

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

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

427  : void
428  {
429  $this->link_params = $l_params;
430  }

◆ setLinkXml()

ilPageObjectGUI::setLinkXml ( string  $xml)

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

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

2077  : void
2078  {
2079  $this->link_xml = $xml;
2080  $this->link_xml_set = true;
2081  }
+ Here is the caller graph for this function:

◆ setOfflineDirectory()

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

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

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

541  : void
542  {
543  $this->offline_directory = $offdir;
544  }
+ Here is the caller graph for this function:

◆ setOldNr()

ilPageObjectGUI::setOldNr ( int  $a_val)

Set old nr (historic page)

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

Referenced by __construct().

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

◆ setOpenPlaceHolder()

ilPageObjectGUI::setOpenPlaceHolder ( string  $a_val)

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

Referenced by insertJSAtPlaceholder().

635  : void
636  {
637  $this->open_place_holder = $a_val;
638  }
+ 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 497 of file class.ilPageObjectGUI.php.

497  : void
498  {
499  $this->page_back_title = $a_title;
500  }

◆ setPageConfig()

ilPageObjectGUI::setPageConfig ( ilPageConfig  $a_val)

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

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

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

◆ setPageLinker()

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

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

References $page_linker.

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

◆ setPageObject()

ilPageObjectGUI::setPageObject ( ilPageObject  $a_pg_obj)

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

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

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

◆ setParentType()

ilPageObjectGUI::setParentType ( string  $a_val)

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

Referenced by __construct().

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

◆ setPrependingHtml()

ilPageObjectGUI::setPrependingHtml ( string  $a_prependinghtml)

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

Referenced by ilDclDetailedViewDefinitionGUI\showPage().

650  : void
651  {
652  $this->prependinghtml = $a_prependinghtml;
653  }
+ Here is the caller graph for this function:

◆ setPresentationTitle()

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

◆ setProfileBackUrl()

ilPageObjectGUI::setProfileBackUrl ( string  $url)

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

References $url.

2096  : void
2097  {
2098  $this->profile_back_url = $url;
2099  }
$url
Definition: shib_logout.php:66

◆ setQEditTabs()

ilPageObjectGUI::setQEditTabs ( string  $a_active)

Set question editing tabs.

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

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

Referenced by executeCommand().

982  : void
983  {
984  $this->tabs_gui->clearTargets();
985 
986  $this->tabs_gui->setBackTarget(
987  $this->lng->txt("back"),
988  $this->ctrl->getLinkTarget($this, "edit")
989  );
990 
991  $this->ctrl->setParameterByClass("ilquestioneditgui", "q_id", $this->requested_q_id);
992  $this->tabs_gui->addTab(
993  "question",
994  $this->lng->txt("question"),
995  $this->ctrl->getLinkTargetByClass("ilquestioneditgui", "editQuestion")
996  );
997 
998  $this->ctrl->setParameterByClass("ilAssQuestionFeedbackEditingGUI", "q_id", $this->requested_q_id);
999  $this->tabs_gui->addTab(
1000  "feedback",
1001  $this->lng->txt("feedback"),
1002  $this->ctrl->getLinkTargetByClass("ilAssQuestionFeedbackEditingGUI", ilAssQuestionFeedbackEditingGUI::CMD_SHOW)
1003  );
1004 
1005  $this->tabs_gui->activateTab($a_active);
1006  }
+ 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 457 of file class.ilPageObjectGUI.php.

References getPageConfig().

Referenced by assQuestionGUI\getILIASPage().

457  : void
458  {
459  $this->getPageConfig()->setQuestionHTML($question_html);
460  }
+ 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 673 of file class.ilPageObjectGUI.php.

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

673  : void
674  {
675  $this->rawpagecontent = $a_rawpagecontent;
676  }
+ Here is the caller graph for this function:

◆ setRenderPageContainer()

ilPageObjectGUI::setRenderPageContainer ( bool  $a_val)

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

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

719  : void
720  {
721  $this->render_page_container = $a_val;
722  }
+ Here is the caller graph for this function:

◆ setScreenIdComponent()

ilPageObjectGUI::setScreenIdComponent ( )

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

References ILIAS\Repository\help().

Referenced by getTabs(), and initEditing().

2666  : void
2667  {
2668  $this->help->setScreenIdComponent("copg");
2669  }
+ 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 482 of file class.ilPageObjectGUI.php.

Referenced by ilLMPresentationGUI\basicPageGuiInit().

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

◆ setStyleId()

◆ setTabHook()

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

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

602  : void {
603  $this->tab_hook = array("obj" => $a_object, "func" => $a_function);
604  }

◆ setTabs()

ilPageObjectGUI::setTabs ( ilTabsGUI  $a_tabs)

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

492  : void
493  {
494  $this->tabs_gui = $a_tabs;
495  }

◆ setTemplate()

ilPageObjectGUI::setTemplate ( ilGlobalTemplateInterface  $main_tpl)

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

Referenced by ilGlossaryTermGUI\output().

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

◆ setTemplateOutput()

ilPageObjectGUI::setTemplateOutput ( bool  $a_output = true)

◆ setTemplateTargetVar()

ilPageObjectGUI::setTemplateTargetVar ( string  $a_variable)

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

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

467  : void
468  {
469  $this->target_var = $a_variable;
470  }
+ 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 555 of file class.ilPageObjectGUI.php.

555  : void
556  {
557  $this->view_page_link = $a_link;
558  $this->view_page_target = $a_target;
559  }

◆ showEditLockInfo()

ilPageObjectGUI::showEditLockInfo ( )
protected

Definition at line 2432 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().

2432  : void
2433  {
2434  $info = $this->lng->txt("content_no_edit_lock");
2435  $lock = $this->getPageObject()->getEditLockInfo();
2436  $info .= "</br>" . $this->lng->txt("content_until") . ": " .
2437  ilDatePresentation::formatDate(new ilDateTime($lock["edit_lock_until"], IL_CAL_UNIX));
2438  $info .= "</br>" . $this->lng->txt("obj_usr") . ": " .
2439  ilUserUtil::getNamePresentation($lock["edit_lock_user"]);
2440 
2441  $back_link = $this->ui->factory()->link()->standard(
2442  $this->lng->txt("back"),
2443  $this->ctrl->getLinkTarget($this, "finishEditing")
2444  );
2445 
2446  $mbox = $this->ui->factory()->messageBox()->info($info)
2447  ->withLinks([$back_link]);
2448  $rendered_mbox = $this->ui->renderer()->render($mbox);
2449 
2450  if (!$this->ctrl->isAsynch()) {
2451  $this->tpl->setContent($rendered_mbox);
2452  } else {
2453  echo $rendered_mbox;
2454  exit;
2455  }
2456  }
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:
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
exit
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:
+ Here is the caller graph for this function:

◆ showEditToolbar()

ilPageObjectGUI::showEditToolbar ( )
protected

Show edit toolbar.

Definition at line 1033 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().

1033  : void
1034  {
1035  $ui = $this->ui;
1036  $lng = $this->lng;
1037  if ($this->getEnableEditing()) {
1038  $b = $ui->factory()->button()->standard(
1039  $lng->txt("edit_page"),
1040  $this->ctrl->getLinkTarget($this, "edit")
1041  );
1042  $this->toolbar->addComponent($b);
1043  }
1044  }
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 2508 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().

2508  : void
2509  {
2510  $this->tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "components/ILIAS/COPage");
2511  $this->tpl->setCurrentBlock("ContentStyle");
2512  $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", 0);
2513  $this->tpl->parseCurrentBlock();
2514 
2515  $this->tpl->setVariable(
2516  "PAGETITLE",
2517  " - " . ilObject::_lookupTitle($this->request->getMobId())
2518  );
2519  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
2520  $this->tpl->setCurrentBlock("ilMedia");
2521 
2522  $media_obj = new ilObjMediaObject($this->request->getMobId());
2523  if ($this->requested_pg_id > 0) {
2524  $pg_obj = ilPageObjectFactory::getInstance($this->obj->getParentType(), $this->requested_pg_id);
2525  $pg_obj->buildDom();
2526 
2527  $xml = "<dummy>";
2528  // todo: we get always the first alias now (problem if mob is used multiple
2529  // times in page)
2530  $xml .= $pg_obj->getMediaAliasElement($this->request->getMobId());
2531  } else {
2532  $xml = "<dummy>";
2533  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
2534  }
2535  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
2536  $xml .= "</dummy>";
2537 
2538 
2539  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
2540  $mode = "fullscreen";
2541  $params = array('mode' => $mode,
2542  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
2543  'webspace_path' => $wb_path);
2544  $output = $this->xsl->process($xml, $params);
2545 
2546  // unmask user html
2547  $this->tpl->setVariable("MEDIA_CONTENT", $output);
2548  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
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 1049 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(), ILIAS\UICore\GlobalTemplate\get(), getAbstractOnly(), ilEditClipboard\getAction(), ilObjStyleSheet\getBaseContentStylePath(), ilPCSection\getCacheTriggerString(), getCompareMode(), getComponentPluginsXML(), getDisabledText(), getEnabledHref(), getEnabledPageFocus(), getEnablePCType(), 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(), insertAdvTrigger(), insertPageToc(), insertResources(), ilMapUtil\isActivated(), isPageContainerToBeRendered(), ilObjMediaObject\isTypeAllowed(), ILIAS\Repository\lng(), ilMediaPoolPage\lookupTitle(), outputToTemplate(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), postOutputProcessing(), replaceCurlyBrackets(), ilPageConfig\SEC_PROTECT_PROTECTED, ILIAS\UICore\GlobalTemplate\setCurrentBlock(), setDefaultLinkXml(), ILIAS\UICore\GlobalTemplate\setVariable(), ILIAS\UICore\GlobalTemplate\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().

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

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

3064  : void
3065  {
3066  $l = $this->request->getString("totransl");
3067  $p = $this->getPageObject();
3068  if (!$this->checkLangPageAvailable($p->getId(), $l)) {
3070  return;
3071  }
3072  $this->ctrl->setParameter($this, "transl", $l);
3073  $this->ctrl->redirect($this, "edit");
3074  }
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 105 of file class.ilPageObjectGUI.php.

Referenced by getAbstractOnly().

◆ $abstract_pcid

string ilPageObjectGUI::$abstract_pcid = ""
protected

Definition at line 115 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 89 of file class.ilPageObjectGUI.php.

◆ $activation

bool ilPageObjectGUI::$activation = false

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

◆ $adv_ref_id

int ilPageObjectGUI::$adv_ref_id = null
protected

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

Referenced by getAdvMdRecordObject().

◆ $adv_subtype

string ilPageObjectGUI::$adv_subtype = null
protected

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

Referenced by getAdvMdRecordObject().

◆ $adv_type

string ilPageObjectGUI::$adv_type = null
protected

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

Referenced by getAdvMdRecordObject().

◆ $compare

ILIAS COPage Compare PageCompare ilPageObjectGUI::$compare
protected

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

◆ $compare_mode

bool ilPageObjectGUI::$compare_mode = false

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

Referenced by getCompareMode().

◆ $component_factory

ilComponentFactory ilPageObjectGUI::$component_factory
protected

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

◆ $concrete_lang

string ilPageObjectGUI::$concrete_lang = ""
protected

Definition at line 138 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\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 90 of file class.ilPageObjectGUI.php.

Referenced by getEditPreview().

◆ $enabled_href

bool ilPageObjectGUI::$enabled_href = true
protected

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

Referenced by getEnabledHref().

◆ $enabled_news

bool ilPageObjectGUI::$enabled_news = false
protected

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

Referenced by getEnabledNews().

◆ $enabledcontentincludes

bool ilPageObjectGUI::$enabledcontentincludes = false

Definition at line 100 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 98 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 108 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 130 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 131 of file class.ilPageObjectGUI.php.

◆ $language

string ilPageObjectGUI::$language
protected

◆ $link

ILIAS COPage Link LinkManager ilPageObjectGUI::$link
protected

◆ $link_frame

string ilPageObjectGUI::$link_frame = ''
protected

Definition at line 109 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 97 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 96 of file class.ilPageObjectGUI.php.

◆ $meta_data_observer_obj

object ilPageObjectGUI::$meta_data_observer_obj = null

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

◆ $meta_data_rep_obj

ilObject ilPageObjectGUI::$meta_data_rep_obj = null

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

◆ $meta_data_sub_obj_id

int ilPageObjectGUI::$meta_data_sub_obj_id = 0

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

◆ $meta_data_type

string ilPageObjectGUI::$meta_data_type = ""

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

◆ $news_obj_id

int ilPageObjectGUI::$news_obj_id = 0
protected

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

◆ $news_obj_type

string ilPageObjectGUI::$news_obj_type = ""
protected

Definition at line 123 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 128 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

ilPageObject ilPageObjectGUI::$obj

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

Referenced by compareVersion(), and getPageObject().

◆ $offline_directory

string ilPageObjectGUI::$offline_directory = ""
protected

Definition at line 127 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 117 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

◆ $page_linker

ILIAS COPage PageLinker ilPageObjectGUI::$page_linker
protected

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

Referenced by setPageLinker().

◆ $parent_type

string ilPageObjectGUI::$parent_type = ""
protected

Definition at line 106 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 112 of file class.ilPageObjectGUI.php.

◆ $pl_start

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

Definition at line 111 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 129 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 139 of file class.ilPageObjectGUI.php.

Referenced by getProfileBackUrl().

◆ $questioninfo

ILIAS TestQuestionPool Questions PublicInterface ilPageObjectGUI::$questioninfo
protected

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

◆ $rawpagecontent

bool ilPageObjectGUI::$rawpagecontent = false

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

Referenced by getRawPageContent().

◆ $render_page_container

bool ilPageObjectGUI::$render_page_container = false

Definition at line 104 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 120 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 119 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 118 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 124 of file class.ilPageObjectGUI.php.

◆ $tabs_enabled

bool ilPageObjectGUI::$tabs_enabled = true

Definition at line 103 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 110 of file class.ilPageObjectGUI.php.

◆ $toolbar

ilToolbarGUI ilPageObjectGUI::$toolbar
protected

◆ $tpl

◆ $ui

◆ $use_meta_data

bool ilPageObjectGUI::$use_meta_data = false

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

◆ $user

◆ $view_page_link

string ilPageObjectGUI::$view_page_link = ""
protected

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

Referenced by getViewPageLink().

◆ $view_page_target

string ilPageObjectGUI::$view_page_target = ""
protected

Definition at line 126 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

const ilPageObjectGUI::PREVIEW = "preview"

◆ PRINTING

const ilPageObjectGUI::PRINTING = "print"

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

Referenced by ilGlossaryPresentationGUI\printView().


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