ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilPageLayoutGUI Class Reference

Class ilPageLayoutGUI GUI class. More...

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

Public Member Functions

 __construct ($a_parent_type, $a_id=0, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 create ()
 
 properties ($a_mode="save", $a_form=null)
 Edit page layout properties. More...
 
 initForm ($a_mode)
 
 updateProperties ()
 Update properties. More...
 
 setTabs ($a_tabs="")
 output tabs More...
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct ( $a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setPageObject (ilPageObject $a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 getViewPageText ()
 get view page text More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 getDisabledText ()
 Get disabled text. More...
 
 activateMetaDataEditor ( $a_rep_obj, $a_type, $a_sub_obj_id, $a_observer_obj=null, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets ($output)
 Replace curly brackets. More...
 
 addActionsMenu ($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 Add actions menu. More...
 
 addMultiLangActionsAndInfo ($a_list, $a_tpl)
 Add multi-language actions to menu. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 Set standard link xml. More...
 
 getProfileBackUrl ()
 Get profile back url. More...
 
 downloadFile ()
 Download file of file lists. More...
 
 displayMediaFullscreen ()
 Show media in fullscreen mode. More...
 
 displayMedia ($a_fullscreen=false)
 Display media. More...
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc ($a_output)
 Insert page toc. More...
 
 insertResources ($a_output)
 Insert resources. More...
 
 insertAdvTrigger ($a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 insertHelp ($a_tpl)
 Insert help texts. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 preview More...
 
 edit ()
 edit ("view" before) More...
 
 insertJSAtPlaceholder ()
 InsertJS at placeholder. More...
 
 initCaptchaForm ()
 Init captcha form. More...
 
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen ($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 ()
 Set screen id component. More...
 
 getTabs ($a_activate="")
 adds tabs to tab gui object More...
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags ($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 ($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 Init form for initially opened content. More...
 
 saveInitialOpenedContent ()
 Save initial opened content. More...
 
 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...
 
 getPagePermaLink ()
 Get page perma link. More...
 

Protected Attributes

 $tabs
 
 $settings
 
 $layout_object = null
 
- Protected Attributes inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $tabs_gui
 
 $access
 
 $plugin_admin
 
 $log
 
 $user
 
 $help
 
 $output_mode
 
 $parent_type = ""
 
 $ui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ( $a_par_type, $a_int_links=false, $a_wiki_links=false, $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)
 Get Tiny Menu. More...
 
- Data Fields inherited from ilPageObjectGUI
 $obj
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $sourcecode_download_script
 
 $change_comments
 
 $question_html
 
 $activation = false
 
 $activated = true
 
 $editpreview = false
 
 $use_meta_data = false
 
 $link_xml_set = false
 
 $enableediting = true
 
 $rawpagecontent = false
 
 $enabledcontentincludes = false
 
 $compare_mode = false
 
 $page_config = null
 
 $tabs_enabled = true
 
 $render_page_container = false
 
 $pl_start = "{{{{{"
 
 $pl_end = "}}}}}"
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 getBlockingInfoMessage ()
 Get block info message. More...
 
 isPageContainerToBeRendered ()
 

Detailed Description

Class ilPageLayoutGUI GUI class.

Author
Hendrik Holtmann holtm.nosp@m.ann@.nosp@m.me.co.nosp@m.m
Version
$Id$

@ilCtrl_Calls ilPageLayoutGUI: ilPageEditorGUI, ilEditClipboardGUI @ilCtrl_Calls ilPageLayoutGUI: ilPublicUserProfileGUI, ilPageObjectGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Reimplemented from ilPageObjectGUI.

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

36 {
37 global $DIC;
38
39 $this->tpl = $DIC["tpl"];
40 $this->ctrl = $DIC->ctrl();
41 $this->tabs = $DIC->tabs();
42 $this->lng = $DIC->language();
43 $this->settings = $DIC->settings();
44 $tpl = $DIC["tpl"];
45
46 parent::__construct($a_parent_type, $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
47
48 //associated object
49 include_once("./Services/COPage/Layout/classes/class.ilPageLayout.php");
50
51 $this->layout_object = new ilPageLayout($a_id);
52 $this->layout_object->readObject();
53
54 // content style
55 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
56 $tpl->setCurrentBlock("ContentStyle");
57 $tpl->setVariable(
58 "LOCATION_CONTENT_STYLESHEET",
59 ilObjStyleSheet::getContentStylePath($this->layout_object->getStyleId())
60 );
61 $tpl->parseCurrentBlock();
62
63 $tpl->setCurrentBlock("SyntaxStyle");
64 $tpl->setVariable(
65 "LOCATION_SYNTAX_STYLESHEET",
67 );
68 $tpl->setVariable(
69 "LOCATION_ADDITIONAL_STYLESHEET",
71 );
72 $tpl->parseCurrentBlock();
73
74 $this->setStyleId($this->layout_object->getStyleId());
75 }
static getSyntaxStylePath()
get syntax style path
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
static getContentStylePath($a_style_id, $add_random=true)
get content style path
Class ilPageLayout.
setStyleId($a_styleid)
Set Style Id.
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, ilPageObjectGUI\$tpl, ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getPlaceHolderStylePath(), ilObjStyleSheet\getSyntaxStylePath(), ilPageObjectGUI\setStyleId(), and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPageLayoutGUI::create ( )

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

103 {
104 $this->properties("insert");
105 }
properties($a_mode="save", $a_form=null)
Edit page layout properties.

References properties().

+ Here is the call graph for this function:

◆ executeCommand()

ilPageLayoutGUI::executeCommand ( )

execute command

Reimplemented from ilPageObjectGUI.

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

81 {
83
84 $next_class = $this->ctrl->getNextClass($this);
85 $cmd = $this->ctrl->getCmd();
86
87 switch ($next_class) {
88 case 'ilmdeditorgui':
89 return parent::executeCommand();
90 break;
91
92 case "ilpageobjectgui":
93die("ilPageLayoutGUI forward to ilpageobjectgui error.");
94 return;
95
96 default:
97 $html = parent::executeCommand();
98 return $html;
99 }
100 }
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18

References ilPageObjectGUI\$ctrl, $html, and $ilCtrl.

◆ initForm()

ilPageLayoutGUI::initForm (   $a_mode)

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

126 {
130
131 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
132 $form_gui = new ilPropertyFormGUI();
133 $form_gui->setFormAction($ilCtrl->getFormAction($this));
134 $form_gui->setTitle($lng->txt("cont_ed_pglprop"));
135
136 // title
137 $title_input = new ilTextInputGUI($lng->txt("title"), "pgl_title");
138 $title_input->setSize(50);
139 $title_input->setMaxLength(128);
140 $title_input->setValue($this->layout_object->title);
141 $title_input->setTitle($lng->txt("title"));
142 $title_input->setRequired(true);
143
144 // description
145 $desc_input = new ilTextAreaInputGUI($lng->txt("description"), "pgl_desc");
146 $desc_input->setValue($this->layout_object->description);
147 $desc_input->setRows(3);
148 $desc_input->setCols(37);
149 $desc_input->setTitle($lng->txt("description"));
150 $desc_input->setRequired(false);
151
152 // modules
153 $mods = new ilCheckboxGroupInputGUI($this->lng->txt("modules"), "module");
154 // $mods->setRequired(true);
155 $mods->setValue($this->layout_object->getModules());
156 foreach (ilPageLayout::getAvailableModules() as $mod_id => $mod_caption) {
157 $mod = new ilCheckboxOption($mod_caption, $mod_id);
158 $mods->addOption($mod);
159 }
160
161 $form_gui->addItem($title_input);
162 $form_gui->addItem($desc_input);
163 $form_gui->addItem($mods);
164
165 // style
166 $fixed_style = $ilSetting->get("fixed_content_style_id");
167 $style_id = $this->layout_object->getStyleId();
168
169 if ($fixed_style > 0) {
170 $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
171 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
172 $this->lng->txt("global_fixed") . ")");
173 $form_gui->addItem($st);
174 } else {
175 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
176 $st_styles = ilObjStyleSheet::_getStandardStyles(true, false);
177 $st_styles[0] = $this->lng->txt("default");
178 ksort($st_styles);
179 $style_sel = new ilSelectInputGUI($lng->txt("obj_sty"), "style_id");
180 $style_sel->setOptions($st_styles);
181 $style_sel->setValue($style_id);
182 $form_gui->addItem($style_sel);
183 }
184
185 $form_gui->addCommandButton("updateProperties", $lng->txt($a_mode));
186
187 return $form_gui;
188 }
This class represents a property in a property form.
This class represents an option in a checkbox group.
This class represents a non editable value in a property form.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupTitle($a_id)
lookup object title
static getAvailableModules()
This class represents a property form user interface.
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.
global $ilSetting
Definition: privfeed.php:17

References ilPageObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilPageObjectGUI\$lng, $settings, ilObjStyleSheet\_getStandardStyles(), ilObject\_lookupTitle(), and ilPageLayout\getAvailableModules().

Referenced by properties(), and updateProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ properties()

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

Edit page layout properties.

Parameters
string$a_modeedit mode

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

113 {
114 $ilTabs = $this->tabs;
115
116 $ilTabs->setTabActive('properties');
117
118 if (!$a_form) {
119 $a_form = $this->initForm($a_mode);
120 }
121
122 $this->tpl->setContent($a_form->getHTML());
123 }

References $tabs, and initForm().

Referenced by create(), and updateProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilPageLayoutGUI::setTabs (   $a_tabs = "")

output tabs

Reimplemented from ilPageObjectGUI.

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

217 {
218 $ilTabs = $this->tabs;
222
223 $ilCtrl->setParameterByClass("ilpagelayoutgui", "obj_id", $this->obj->getId());
224 $ilTabs->addTarget(
225 "properties",
226 $ilCtrl->getLinkTarget($this, "properties"),
227 array("properties","", ""),
228 "",
229 ""
230 );
231 $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.svg"));
232 $tpl->setTitle($this->layout_object->getTitle());
233 $tpl->setDescription("");
234 // $tpl->setTitle(
235 // $lng->txt("sahs_page").": ".$this->node_object->getTitle());
236 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilPageObjectGUI\$ctrl, $ilCtrl, ilPageObjectGUI\$lng, $tabs, ilPageObjectGUI\$tpl, and ilUtil\getImagePath().

+ Here is the call graph for this function:

◆ updateProperties()

ilPageLayoutGUI::updateProperties ( )

Update properties.

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

194 {
196
197 $form = $this->initForm("save");
198 if (!$form->checkInput()) {
199 $form->setValuesByPost();
200 return $this->properties("save", $form);
201 }
202
203 $this->layout_object->setTitle($form->getInput('pgl_title'));
204 $this->layout_object->setDescription($form->getInput('pgl_desc'));
205 $this->layout_object->setStyleId($form->getInput('style_id'));
206 $this->layout_object->setModules($form->getInput('module'));
207 $this->layout_object->update();
208
209 ilUtil::sendInfo($lng->txt("saved_successfully"));
210 $this->properties();
211 }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form

References $form, ilPageObjectGUI\$lng, initForm(), properties(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

Field Documentation

◆ $layout_object

ilPageLayoutGUI::$layout_object = null
protected

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

◆ $settings

ilPageLayoutGUI::$settings
protected

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

Referenced by initForm().

◆ $tabs

ilPageLayoutGUI::$tabs
protected

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

Referenced by properties(), and setTabs().


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