ILIAS  release_4-4 Revision
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 ($a_parent_type, $a_id=0, $a_old_nr=0, $a_slm_id=0)
 
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 ()
 output tabs More...
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($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)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 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_id, $a_sub_obj_id, $a_type, $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 ()
 
 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...
 
 insertContentIncludes ($a_html)
 Insert content includes. 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...
 
 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...
 
 getQuestionJsOfPage ($a_no_interaction=false)
 Get question js. More...
 
 initSelfAssessmentRendering ($a_force_no_form=false)
 Init question handling. More...
 
 processAnswer ()
 Process answer. More...
 
 selfAssessmentRendering ($a_output)
 Self assessment question rendering. 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...
 

Data Fields

 $layout_object = null
 Constructor. 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 = "}}}}}"
 

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)
 Get Tiny Menu. More...
 
static addPreparationJavascript ($a_tpl, $a_lang)
 Add standard texts. More...
 
static getJSTextInitCode ($a_lang)
 Get js txt init code. More...
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilPageLayoutGUI::__construct (   $a_parent_type,
  $a_id = 0,
  $a_old_nr = 0,
  $a_slm_id = 0 
)

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

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

27  {
28  global $tpl,$ilCtrl;
29 
30  parent::__construct($a_parent_type, $a_id, $a_old_nr);
31 
32  //associated object
33  include_once("./Services/Style/classes/class.ilPageLayout.php");
34 
35  $this->layout_object = new ilPageLayout($a_id);
36  $this->layout_object->readObject();
37 
38  // content style
39  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
40  $tpl->setCurrentBlock("ContentStyle");
41  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
42  ilObjStyleSheet::getContentStylePath($this->layout_object->getStyleId()));
43  $tpl->parseCurrentBlock();
44 
45  $tpl->setCurrentBlock("SyntaxStyle");
46  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
48  $tpl->setVariable("LOCATION_ADDITIONAL_STYLESHEET",
50  $tpl->parseCurrentBlock();
51 
52  $this->setStyleId($this->layout_object->getStyleId());
53 
54  $this->slm_id = $a_slm_id;
55 
56  }
getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
Class ilPageLayout.
getSyntaxStylePath()
get syntax style path
global $ilCtrl
Definition: ilias.php:18
setStyleId($a_styleid)
Set Style Id.
getContentStylePath($a_style_id)
get content style path
+ 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  {
85  $this->properties("insert");
86  }
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 61 of file class.ilPageLayoutGUI.php.

References $cmd, and $ilCtrl.

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

◆ initForm()

ilPageLayoutGUI::initForm (   $a_mode)

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

108  {
109  global $ilCtrl, $lng, $ilSetting;
110 
111  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
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("modules"), "module");
134  // $mods->setRequired(true);
135  $mods->setValue($this->layout_object->getModules());
136  foreach(ilPageLayout::getAvailableModules() as $mod_id => $mod_caption)
137  {
138  $mod = new ilCheckboxOption($mod_caption, $mod_id);
139  $mods->addOption($mod);
140  }
141 
142  $form_gui->addItem($title_input);
143  $form_gui->addItem($desc_input);
144  $form_gui->addItem($mods);
145 
146  // style
147  $fixed_style = $ilSetting->get("fixed_content_style_id");
148  $style_id = $this->layout_object->getStyleId();
149 
150  if ($fixed_style > 0)
151  {
152  $st = new ilNonEditableValueGUI($lng->txt("cont_current_style"));
153  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
154  $this->lng->txt("global_fixed").")");
155  $form_gui->addItem($st);
156  }
157  else
158  {
159  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
160  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false);
161  $st_styles[0] = $this->lng->txt("default");
162  ksort($st_styles);
163  $style_sel = new ilSelectInputGUI($lng->txt("obj_sty"), "style_id");
164  $style_sel->setOptions($st_styles);
165  $style_sel->setValue($style_id);
166  $form_gui->addItem($style_sel);
167  }
168 
169  $form_gui->addCommandButton("updateProperties", $lng->txt($a_mode));
170 
171  return $form_gui;
172  }
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.
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.
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
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:40
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 93 of file class.ilPageLayoutGUI.php.

References initForm().

Referenced by create(), and updateProperties().

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

◆ setTabs()

ilPageLayoutGUI::setTabs ( )

output tabs

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

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

202  {
203  global $ilTabs, $ilCtrl, $tpl, $lng;
204  $ilCtrl->setParameterByClass("ilpagelayoutgui", "obj_id", $this->obj->id);
205  $ilTabs->addTarget("properties",
206  $ilCtrl->getLinkTarget($this, "properties"), array("properties","", ""), "", "");
207  $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
208  $tpl->setTitle($this->layout_object->getTitle());
209  $tpl->setDescription("");
210  // $tpl->setTitle(
211  // $lng->txt("sahs_page").": ".$this->node_object->getTitle());
212  }
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)
+ Here is the call graph for this function:

◆ updateProperties()

ilPageLayoutGUI::updateProperties ( )

Update properties.

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

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

178  {
179  global $lng;
180 
181  $form = $this->initForm("save");
182  if(!$form->checkInput())
183  {
184  $form->setValuesByPost();
185  return $this->properties("save", $form);
186  }
187 
188  $this->layout_object->setTitle($form->getInput('pgl_title'));
189  $this->layout_object->setDescription($form->getInput('pgl_desc'));
190  $this->layout_object->setStyleId($form->getInput('style_id'));
191  $this->layout_object->setModules($form->getInput('module'));
192  $this->layout_object->update();
193 
194  ilUtil::sendInfo($lng->txt("saved_successfully"));
195  $this->properties();
196  }
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

Constructor.

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


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