ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPageLayoutGUI Class Reference

Class ilPageLayoutGUI GUI class. More...

+ Inheritance diagram for ilPageLayoutGUI:
+ Collaboration diagram for ilPageLayoutGUI:

Public Member Functions

 __construct (string $a_parent_type, int $a_id=0, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="")
 
 executeCommand ()
 
 create ()
 
 properties (string $a_mode="save", ilPropertyFormGUI $a_form=null)
 Edit page layout properties. More...
 
 initForm (string $a_mode)
 
 updateProperties ()
 
 setTabs (ilTabsGUI $a_tabs=null)
 output tabs More...
 
 finishEditing ()
 
- Public Member Functions inherited from 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="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableChangeComments (bool $a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 
 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...
 

Protected Attributes

ilTabsGUI $tabs
 
ilSetting $settings
 
ilPageLayout $layout_object = null
 
- Protected Attributes inherited from ilPageObjectGUI
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
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
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 inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $change_comments = false
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilPageLayoutGUI::__construct ( string  $a_parent_type,
int  $a_id = 0,
int  $a_old_nr = 0,
bool  $a_prevent_get_id = false,
string  $a_lang = "" 
)

Definition at line 34 of file class.ilPageLayoutGUI.php.

References $DIC, ilPageObjectGUI\$tpl, ILIAS\GlobalScreen\Provider\__construct(), ilGlobalTemplateInterface\addCss(), ILIAS\Repository\ctrl(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getPlaceHolderStylePath(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\parseCurrentBlock(), ilGlobalTemplateInterface\setCurrentBlock(), ILIAS\Repository\settings(), ilGlobalTemplateInterface\setVariable(), and ILIAS\Repository\tabs().

40  {
41  global $DIC;
42 
43  $this->tpl = $DIC["tpl"];
44  $this->ctrl = $DIC->ctrl();
45  $this->tabs = $DIC->tabs();
46  $this->lng = $DIC->language();
47  $this->settings = $DIC->settings();
48  $tpl = $DIC["tpl"];
49 
50  parent::__construct($a_parent_type, $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
51 
52  //associated object
53  $this->layout_object = new ilPageLayout($a_id);
54  $this->layout_object->readObject();
55 
56  // content style
57  $tpl->setCurrentBlock("ContentStyle");
59  "LOCATION_CONTENT_STYLESHEET",
61  );
63 
66 
67 // $this->setStyleId($this->layout_object->getStyleId());
68  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
ilGlobalTemplateInterface $tpl
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
__construct(Container $dic, ilPlugin $plugin)
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPageLayoutGUI::create ( )

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

References properties().

84  : void
85  {
86  $this->properties("insert");
87  }
properties(string $a_mode="save", ilPropertyFormGUI $a_form=null)
Edit page layout properties.
+ Here is the call graph for this function:

◆ executeCommand()

ilPageLayoutGUI::executeCommand ( )

Definition at line 70 of file class.ilPageLayoutGUI.php.

References ILIAS\Repository\ctrl().

70  : string
71  {
72  $next_class = $this->ctrl->getNextClass($this);
73 
74  switch ($next_class) {
75  case 'ilmdeditorgui':
76  return parent::executeCommand();
77 
78  default:
79  $html = parent::executeCommand();
80  return $html;
81  }
82  }
+ Here is the call graph for this function:

◆ finishEditing()

ilPageLayoutGUI::finishEditing ( )

Definition at line 217 of file class.ilPageLayoutGUI.php.

References ILIAS\Repository\ctrl().

217  : void
218  {
219  $this->ctrl->redirectByClass("ilpagelayoutadministrationgui", "listLayouts");
220  }
+ Here is the call graph for this function:

◆ initForm()

ilPageLayoutGUI::initForm ( string  $a_mode)

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

References ilPageObjectGUI\$ctrl, $ilSetting, ilPageObjectGUI\$lng, $settings, ilPageLayout\getAvailableModules(), ILIAS\Repository\lng(), ilCheckboxGroupInputGUI\setValue(), ilTextAreaInputGUI\setValue(), and ilLanguage\txt().

Referenced by properties(), and updateProperties().

107  {
108  $ilCtrl = $this->ctrl;
109  $lng = $this->lng;
111 
112  $form_gui = new ilPropertyFormGUI();
113  $form_gui->setFormAction($ilCtrl->getFormAction($this));
114  $form_gui->setTitle($lng->txt("cont_ed_pglprop"));
115 
116  // title
117  $title_input = new ilTextInputGUI($lng->txt("title"), "pgl_title");
118  $title_input->setSize(50);
119  $title_input->setMaxLength(128);
120  $title_input->setValue($this->layout_object->title);
121  $title_input->setTitle($lng->txt("title"));
122  $title_input->setRequired(true);
123 
124  // description
125  $desc_input = new ilTextAreaInputGUI($lng->txt("description"), "pgl_desc");
126  $desc_input->setValue($this->layout_object->description);
127  $desc_input->setRows(3);
128  $desc_input->setCols(37);
129  $desc_input->setTitle($lng->txt("description"));
130  $desc_input->setRequired(false);
131 
132  // modules
133  $mods = new ilCheckboxGroupInputGUI($this->lng->txt("copg_obj_types"), "module");
134  // $mods->setRequired(true);
135  $mods->setValue($this->layout_object->getModules());
136  foreach (ilPageLayout::getAvailableModules() as $mod_id => $mod_caption) {
137  $mod = new ilCheckboxOption($mod_caption, $mod_id);
138  $mods->addOption($mod);
139  }
140 
141  $form_gui->addItem($title_input);
142  $form_gui->addItem($desc_input);
143  $form_gui->addItem($mods);
144 
145  $form_gui->addCommandButton("updateProperties", $lng->txt($a_mode));
146 
147  return $form_gui;
148  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 getAvailableModules()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $ilSetting
Definition: privfeed.php:17
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ properties()

ilPageLayoutGUI::properties ( string  $a_mode = "save",
ilPropertyFormGUI  $a_form = null 
)

Edit page layout properties.

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

References $tabs, initForm(), and ilTabsGUI\setTabActive().

Referenced by create(), and updateProperties().

95  : void {
96  $ilTabs = $this->tabs;
97 
98  $ilTabs->setTabActive('properties');
99 
100  if (!$a_form) {
101  $a_form = $this->initForm($a_mode);
102  }
103  $this->tpl->setContent($a_form->getHTML());
104  }
initForm(string $a_mode)
setTabActive(string $a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilPageLayoutGUI::setTabs ( ilTabsGUI  $a_tabs = null)

output tabs

Definition at line 173 of file class.ilPageLayoutGUI.php.

References ilPageObjectGUI\$ctrl, $DIC, Vendor\Package\$f, ilPageObjectGUI\$lng, $tabs, ilPageObjectGUI\$tpl, ilPageObjectGUI\$ui, ilPageLayout\activeLayouts(), ilUtil\getImagePath(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), ilGlobalTemplateInterface\setTitleIcon(), and ilLanguage\txt().

Referenced by ilPageLayoutAdministrationGUI\executeCommand().

173  : void
174  {
175  $ilTabs = $this->tabs;
176  $ilCtrl = $this->ctrl;
177  $tpl = $this->tpl;
178 
179  $ilCtrl->setParameterByClass("ilpagelayoutgui", "obj_id", $this->obj->getId());
180  $ilTabs->addTab(
181  "properties",
182  $this->lng->txt("settings"),
183  $ilCtrl->getLinkTarget($this, "properties")
184  );
185  $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.svg"));
186  $tpl->setTitle($this->layout_object->getTitle());
187  $tpl->setDescription("");
188  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
ilGlobalTemplateInterface $tpl
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setDescription(string $a_descr)
Sets description below title in standard template.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateProperties()

ilPageLayoutGUI::updateProperties ( )

Definition at line 150 of file class.ilPageLayoutGUI.php.

References ilPageObjectGUI\$form, ilPageObjectGUI\$lng, ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), initForm(), properties(), ilPropertyFormGUI\setValuesByPost(), and ilLanguage\txt().

150  : void
151  {
152  $lng = $this->lng;
153 
154  $form = $this->initForm("save");
155  if (!$form->checkInput()) {
157  $this->properties("save", $form);
158  return;
159  }
160 
161  $this->layout_object->setTitle($form->getInput('pgl_title'));
162  $this->layout_object->setDescription($form->getInput('pgl_desc'));
163  $this->layout_object->setModules($form->getInput('module'));
164  $this->layout_object->update();
165 
166  $this->tpl->setOnScreenMessage('info', $lng->txt("saved_successfully"));
167  $this->properties();
168  }
properties(string $a_mode="save", ilPropertyFormGUI $a_form=null)
Edit page layout properties.
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...
initForm(string $a_mode)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
ilPropertyFormGUI $form
+ Here is the call graph for this function:

Field Documentation

◆ $layout_object

ilPageLayout ilPageLayoutGUI::$layout_object = null
protected

Definition at line 32 of file class.ilPageLayoutGUI.php.

◆ $settings

ilSetting ilPageLayoutGUI::$settings
protected

Definition at line 31 of file class.ilPageLayoutGUI.php.

Referenced by initForm().

◆ $tabs

ilTabsGUI ilPageLayoutGUI::$tabs
protected

Definition at line 30 of file class.ilPageLayoutGUI.php.

Referenced by properties(), and setTabs().


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