ILIAS  release_7 Revision v7.30-3-g800a261c036
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="", $concrete_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...
 
 setOpenPlaceHolder ($a_val)
 Set open placeholder. More...
 
 getOpenPlaceHolder ()
 Get open placeholder. 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, $pcid="")
 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...
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 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...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. 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...
 
 getBlockingInfoMessage ()
 Get block info message. 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, $export=false)
 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...
 
 finishEditing ()
 
 getPagePermaLink ()
 Get page perma link. More...
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 

Protected Attributes

 $tabs
 
 $settings
 
 $layout_object = null
 
- Protected Attributes inherited from ilPageObjectGUI
 $profile_back_url = ""
 
 $enabled_href = true
 
 $tpl
 
 $lng
 
 $ctrl
 
 $tabs_gui
 
 $access
 
 $plugin_admin
 
 $log
 
 $user
 
 $help
 
 $output_mode
 
 $parent_type = ""
 
 $tool_context
 
 $ui
 
 $page_linker
 
 $abstract_pcid = ""
 
 $toolbar
 
 $open_place_holder
 

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, \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"
 
 $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...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 Init editing. More...
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 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\getEffectiveContentStyleId(), 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(
68  $this->layout_object->getStyleId()
69  )
70  );
71  }
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 getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
global $DIC
Definition: goto.php:24
static getSyntaxStylePath()
get syntax style path
setStyleId($a_styleid)
Set Style Id.
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ create()

ilPageLayoutGUI::create ( )

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

References properties().

99  {
100  $this->properties("insert");
101  }
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 76 of file class.ilPageLayoutGUI.php.

References ilPageObjectGUI\$ctrl.

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

◆ initForm()

ilPageLayoutGUI::initForm (   $a_mode)

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

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

Referenced by properties(), and updateProperties().

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

References $tabs, and initForm().

Referenced by create(), and updateProperties().

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

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

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

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

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