ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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_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=self::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 ()
 
 setPageLinker ($page_linker)
 
 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...
 
 setLinkXml ($xml)
 Set linkXML. More...
 
 getProfileBackUrl ()
 Get profile back url. More...
 
 setProfileBackUrl ($url)
 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...
 
 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=self::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
 $profile_back_url = ""
 
 $tpl
 
 $lng
 
 $ctrl
 
 $tabs_gui
 
 $access
 
 $plugin_admin
 
 $log
 
 $user
 
 $help
 
 $output_mode
 
 $parent_type = ""
 
 $tool_context
 
 $ui
 
 $page_linker
 

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
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
 $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 ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

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 35 of file class.ilPageLayoutGUI.php.

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

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 
65 
66  $this->setStyleId($this->layout_object->getStyleId());
67  }
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
settings()
Definition: settings.php:2
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
Class ilPageLayout.
static getSyntaxStylePath()
get syntax style path
setStyleId($a_styleid)
Set Style Id.
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPageLayoutGUI::create ( )

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

References properties().

95  {
96  $this->properties("insert");
97  }
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 72 of file class.ilPageLayoutGUI.php.

References ilPageObjectGUI\$ctrl, and $ilCtrl.

73  {
75 
76  $next_class = $this->ctrl->getNextClass($this);
77  $cmd = $this->ctrl->getCmd();
78 
79  switch ($next_class) {
80  case 'ilmdeditorgui':
81  return parent::executeCommand();
82  break;
83 
84  case "ilpageobjectgui":
85 die("ilPageLayoutGUI forward to ilpageobjectgui error.");
86  return;
87 
88  default:
89  $html = parent::executeCommand();
90  return $html;
91  }
92  }
global $ilCtrl
Definition: ilias.php:18

◆ initForm()

ilPageLayoutGUI::initForm (   $a_mode)

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

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

Referenced by properties(), and updateProperties().

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

References $tabs, and initForm().

Referenced by create(), and updateProperties().

105  {
106  $ilTabs = $this->tabs;
107 
108  $ilTabs->setTabActive('properties');
109 
110  if (!$a_form) {
111  $a_form = $this->initForm($a_mode);
112  }
113 
114  $this->tpl->setContent($a_form->getHTML());
115  }
+ 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 208 of file class.ilPageLayoutGUI.php.

References ilPageObjectGUI\$ctrl, $DIC, Vendor\Package\$f, $ilCtrl, ilPageObjectGUI\$lng, $tabs, ilPageObjectGUI\$tpl, ilPageObjectGUI\$ui, ilPageLayout\activeLayouts(), and ilUtil\getImagePath().

209  {
210  $ilTabs = $this->tabs;
212  $tpl = $this->tpl;
213  $lng = $this->lng;
214 
215  $ilCtrl->setParameterByClass("ilpagelayoutgui", "obj_id", $this->obj->getId());
216  $ilTabs->addTarget(
217  "properties",
218  $ilCtrl->getLinkTarget($this, "properties"),
219  array("properties","", ""),
220  "",
221  ""
222  );
223  $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.svg"));
224  $tpl->setTitle($this->layout_object->getTitle());
225  $tpl->setDescription("");
226  }
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 185 of file class.ilPageLayoutGUI.php.

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

186  {
187  $lng = $this->lng;
188 
189  $form = $this->initForm("save");
190  if (!$form->checkInput()) {
191  $form->setValuesByPost();
192  return $this->properties("save", $form);
193  }
194 
195  $this->layout_object->setTitle($form->getInput('pgl_title'));
196  $this->layout_object->setDescription($form->getInput('pgl_desc'));
197  $this->layout_object->setStyleId($form->getInput('style_id'));
198  $this->layout_object->setModules($form->getInput('module'));
199  $this->layout_object->update();
200 
201  ilUtil::sendInfo($lng->txt("saved_successfully"));
202  $this->properties();
203  }
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 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: