ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($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...
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 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...
 
 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...
 
 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...
 
 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...
 
 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...
 

Protected Attributes

 $layout_object = null
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 
 $log
 

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
 $tpl
 
 $lng
 
 $ctrl
 
 $obj
 
 $output_mode
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $bib_id
 
 $citation
 
 $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...
 
 isPageContainerToBeRendered ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

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

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

26  {
27  global $tpl;
28 
29  parent::__construct($a_parent_type, $a_id, $a_old_nr, $a_prevent_get_id, $a_lang);
30 
31  //associated object
32  include_once("./Services/COPage/Layout/classes/class.ilPageLayout.php");
33 
34  $this->layout_object = new ilPageLayout($a_id);
35  $this->layout_object->readObject();
36 
37  // content style
38  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
39  $tpl->setCurrentBlock("ContentStyle");
40  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
41  ilObjStyleSheet::getContentStylePath($this->layout_object->getStyleId()));
42  $tpl->parseCurrentBlock();
43 
44  $tpl->setCurrentBlock("SyntaxStyle");
45  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
47  $tpl->setVariable("LOCATION_ADDITIONAL_STYLESHEET",
49  $tpl->parseCurrentBlock();
50 
51  $this->setStyleId($this->layout_object->getStyleId());
52 
53  }
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
Class ilPageLayout.
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
setStyleId($a_styleid)
Set Style Id.
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPageLayoutGUI::create ( )

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

References properties().

81  {
82  $this->properties("insert");
83  }
properties($a_mode="save", $a_form=null)
Edit page layout properties.
+ Here is the call graph for this function:

◆ executeCommand()

ilPageLayoutGUI::executeCommand ( )

execute command

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

References $cmd, $html, and $ilCtrl.

59  {
60  global $ilCtrl;
61 
62  $next_class = $this->ctrl->getNextClass($this);
63  $cmd = $this->ctrl->getCmd();
64 
65  switch($next_class)
66  {
67  case 'ilmdeditorgui':
68  return parent::executeCommand();
69  break;
70 
71  case "ilpageobjectgui":
72 die("ilPageLayoutGUI forward to ilpageobjectgui error.");
73  return;
74 
75  default:
76  $html = parent::executeCommand();
77  return $html;
78  }
79  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
$html
Definition: example_001.php:87

◆ initForm()

ilPageLayoutGUI::initForm (   $a_mode)

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

References $ilCtrl, $ilSetting, ilPageObjectGUI\$lng, ilObjStyleSheet\_getStandardStyles(), ilObject\_lookupTitle(), ilPageLayout\getAvailableModules(), ilSelectInputGUI\setOptions(), ilTextInputGUI\setSize(), ilNonEditableValueGUI\setValue(), ilCheckboxGroupInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by properties(), and updateProperties().

105  {
106  global $ilCtrl, $lng, $ilSetting;
107 
108  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
109  $form_gui = new ilPropertyFormGUI();
110  $form_gui->setFormAction($ilCtrl->getFormAction($this));
111  $form_gui->setTitle($lng->txt("cont_ed_pglprop"));
112 
113  // title
114  $title_input = new ilTextInputGUI($lng->txt("title"),"pgl_title");
115  $title_input->setSize(50);
116  $title_input->setMaxLength(128);
117  $title_input->setValue($this->layout_object->title);
118  $title_input->setTitle($lng->txt("title"));
119  $title_input->setRequired(true);
120 
121  // description
122  $desc_input = new ilTextAreaInputGUI($lng->txt("description"),"pgl_desc");
123  $desc_input->setValue($this->layout_object->description);
124  $desc_input->setRows(3);
125  $desc_input->setCols(37);
126  $desc_input->setTitle($lng->txt("description"));
127  $desc_input->setRequired(false);
128 
129  // modules
130  $mods = new ilCheckboxGroupInputGUI($this->lng->txt("modules"), "module");
131  // $mods->setRequired(true);
132  $mods->setValue($this->layout_object->getModules());
133  foreach(ilPageLayout::getAvailableModules() as $mod_id => $mod_caption)
134  {
135  $mod = new ilCheckboxOption($mod_caption, $mod_id);
136  $mods->addOption($mod);
137  }
138 
139  $form_gui->addItem($title_input);
140  $form_gui->addItem($desc_input);
141  $form_gui->addItem($mods);
142 
143  // style
144  $fixed_style = $ilSetting->get("fixed_content_style_id");
145  $style_id = $this->layout_object->getStyleId();
146 
147  if ($fixed_style > 0)
148  {
149  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
150  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
151  $this->lng->txt("global_fixed").")");
152  $form_gui->addItem($st);
153  }
154  else
155  {
156  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
157  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false);
158  $st_styles[0] = $this->lng->txt("default");
159  ksort($st_styles);
160  $style_sel = new ilSelectInputGUI($lng->txt("obj_sty"), "style_id");
161  $style_sel->setOptions($st_styles);
162  $style_sel->setValue($style_id);
163  $form_gui->addItem($style_sel);
164  }
165 
166  $form_gui->addCommandButton("updateProperties", $lng->txt($a_mode));
167 
168  return $form_gui;
169  }
This class represents an option in a checkbox group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
static _getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
setValue($a_value)
Set Value.
static _lookupTitle($a_id)
lookup object title
global $ilCtrl
Definition: ilias.php:18
static getAvailableModules()
setSize($a_size)
Set Size.
This class represents a text property in a property form.
This class represents a property in a property form.
setOptions($a_options)
Set Options.
This class represents a non editable value in a property form.
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 (   $a_mode = "save",
  $a_form = null 
)

Edit page layout properties.

Parameters
string$a_modeedit mode

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

References initForm().

Referenced by create(), and updateProperties().

91  {
92  global $ilTabs;
93 
94  $ilTabs->setTabActive('properties');
95 
96  if(!$a_form)
97  {
98  $a_form = $this->initForm($a_mode);
99  }
100 
101  $this->tpl->setContent($a_form->getHTML());
102  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilPageLayoutGUI::setTabs (   $a_tabs = "")

output tabs

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

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

199  {
200  global $ilTabs, $ilCtrl, $tpl, $lng;
201 
202  $ilCtrl->setParameterByClass("ilpagelayoutgui", "obj_id", $this->obj->id);
203  $ilTabs->addTarget("properties",
204  $ilCtrl->getLinkTarget($this, "properties"), array("properties","", ""), "", "");
205  $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.svg"));
206  $tpl->setTitle($this->layout_object->getTitle());
207  $tpl->setDescription("");
208  // $tpl->setTitle(
209  // $lng->txt("sahs_page").": ".$this->node_object->getTitle());
210  }
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ updateProperties()

ilPageLayoutGUI::updateProperties ( )

Update properties.

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

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

175  {
176  global $lng;
177 
178  $form = $this->initForm("save");
179  if(!$form->checkInput())
180  {
181  $form->setValuesByPost();
182  return $this->properties("save", $form);
183  }
184 
185  $this->layout_object->setTitle($form->getInput('pgl_title'));
186  $this->layout_object->setDescription($form->getInput('pgl_desc'));
187  $this->layout_object->setStyleId($form->getInput('style_id'));
188  $this->layout_object->setModules($form->getInput('module'));
189  $this->layout_object->update();
190 
191  ilUtil::sendInfo($lng->txt("saved_successfully"));
192  $this->properties();
193  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
properties($a_mode="save", $a_form=null)
Edit page layout properties.
+ Here is the call graph for this function:

Field Documentation

◆ $layout_object

ilPageLayoutGUI::$layout_object = null
protected

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


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