ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjAdvancedEditingGUI Class Reference

Class ilObjAdvancedEditingGUI. More...

+ Inheritance diagram for ilObjAdvancedEditingGUI:
+ Collaboration diagram for ilObjAdvancedEditingGUI:

Public Member Functions

 executeCommand ()
 
 saveObject ()
 
 getAdminTabs ()
 
 addSubtabs ()
 
 addPageEditorSettingsSubtabs ()
 
 settingsObject ()
 
 getTinyForm ()
 
 saveSettingsObject ()
 
 assessmentObject ()
 
 saveAssessmentSettingsObject ()
 
 surveyObject ()
 
 saveSurveySettingsObject ()
 
 frmPostObject ()
 
 saveFrmPostSettingsObject ()
 
 excAssObject ()
 
 saveExcAssSettingsObject ()
 
 showPageEditorSettingsObject ()
 
 initPageEditorForm ()
 
 savePageEditorSettingsObject ()
 
 showGeneralPageEditorSettingsObject ()
 
 initGeneralPageSettingsForm ()
 
 saveGeneralPageSettingsObject ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 getTabs ()
 
 initTagsForm (string $a_id, string $a_cmd, string $a_title)
 
 saveTags (string $a_id, string $a_cmd, ilPropertyFormGUI $form)
 
 getPageObjectKeysWithOptionalHTML ()
 This limits the possibility to allow html for these page objects that supported the feature in the past. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 

Protected Attributes

ilPropertyFormGUI $form
 
string $cgrp = ""
 
StandardGUIRequest $std_request
 
ilComponentRepository $component_repository
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Member Function Documentation

◆ addPageEditorSettingsSubtabs()

ilObjAdvancedEditingGUI::addPageEditorSettingsSubtabs ( )

Definition at line 145 of file class.ilObjAdvancedEditingGUI.php.

References ILIAS\Repository\ctrl(), and ilPageEditorSettings\getGroups().

Referenced by showGeneralPageEditorSettingsObject(), and showPageEditorSettingsObject().

145  : void
146  {
147  $this->tabs_gui->addSubTabTarget(
148  "adve_pe_general",
149  $this->ctrl->getLinkTarget($this, "showGeneralPageEditorSettings"),
150  array("showGeneralPageEditorSettings", "", "view")
151  );
152 
154 
155  foreach ($grps as $g => $types) {
156  $this->ctrl->setParameter($this, "grp", $g);
157  $this->tabs_gui->addSubTabTarget(
158  "adve_grp_" . $g,
159  $this->ctrl->getLinkTarget($this, "showPageEditorSettings"),
160  array("showPageEditorSettings")
161  );
162  }
163  $this->ctrl->setParameter($this, "grp", $this->std_request->getGroup());
164  }
static getGroups()
Get all settings groups.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addSubtabs()

ilObjAdvancedEditingGUI::addSubtabs ( )

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

References ILIAS\Repository\ctrl().

Referenced by getTabs().

98  : void
99  {
100  if ($this->ctrl->getNextClass() !== "ilpermissiongui" &&
101  !in_array($this->ctrl->getCmd(), array(
102  "showPageEditorSettings",
103  "showGeneralPageEditorSettings",
104  "",
105  "view"
106  ), true)) {
107  $this->tabs_gui->addSubTabTarget(
108  "adve_general_settings",
109  $this->ctrl->getLinkTarget($this, "settings"),
110  array("settings", "saveSettings"),
111  "",
112  ""
113  );
114  $this->tabs_gui->addSubTabTarget(
115  "adve_assessment_settings",
116  $this->ctrl->getLinkTarget($this, "assessment"),
117  array("assessment", "saveAssessmentSettings"),
118  "",
119  ""
120  );
121  $this->tabs_gui->addSubTabTarget(
122  "adve_survey_settings",
123  $this->ctrl->getLinkTarget($this, "survey"),
124  array("survey", "saveSurveySettings"),
125  "",
126  ""
127  );
128  $this->tabs_gui->addSubTabTarget(
129  "adve_frm_post_settings",
130  $this->ctrl->getLinkTarget($this, "frmPost"),
131  array("frmPost", "saveFrmPostSettings"),
132  "",
133  ""
134  );
135  $this->tabs_gui->addSubTabTarget(
136  "adve_excass_settings",
137  $this->ctrl->getLinkTarget($this, "excass"),
138  array("excass", "saveExcAssSettings"),
139  "",
140  ""
141  );
142  }
143  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assessmentObject()

ilObjAdvancedEditingGUI::assessmentObject ( )

Definition at line 237 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), and initTagsForm().

237  : void
238  {
239  $form = $this->initTagsForm(
240  "assessment",
241  "saveAssessmentSettings",
242  "advanced_editing_assessment_settings"
243  );
244 
245  $this->tpl->setContent($form->getHTML());
246  }
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ excAssObject()

ilObjAdvancedEditingGUI::excAssObject ( )

Definition at line 309 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), and initTagsForm().

309  : void
310  {
311  $form = $this->initTagsForm(
312  "exc_ass",
313  "saveExcAssSettings",
314  "advanced_editing_excass_settings"
315  );
316 
317  $this->tpl->setContent($form->getHTML());
318  }
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjAdvancedEditingGUI::executeCommand ( )

Definition at line 54 of file class.ilObjAdvancedEditingGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilObjectGUI\prepareOutput().

54  : void
55  {
56  if (!$this->rbac_system->checkAccess('read', $this->object->getRefId())) {
57  $mess = str_replace("%s", $this->object->getTitle(), $this->lng->txt("msg_no_perm_read_item"));
58  $this->ilias->raiseError($mess, $this->ilias->error_obj->WARNING);
59  }
60 
61  $next_class = $this->ctrl->getNextClass($this);
62  $cmd = $this->ctrl->getCmd();
63  $this->prepareOutput();
64 
65  switch ($next_class) {
66  case 'ilpermissiongui':
67  $perm_gui = new ilPermissionGUI($this);
68  $this->ctrl->forwardCommand($perm_gui);
69  break;
70 
71  default:
72  if ($cmd === null || $cmd === "" || $cmd === "view") {
73  $cmd = "showGeneralPageEditorSettings";
74  }
75  $cmd .= "Object";
76  $this->$cmd();
77 
78  break;
79  }
80  }
prepareOutput(bool $show_sub_objects=true)
header include for all ilias files.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ frmPostObject()

ilObjAdvancedEditingGUI::frmPostObject ( )

Definition at line 285 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), and initTagsForm().

285  : void
286  {
287  $form = $this->initTagsForm(
288  "frm_post",
289  "saveFrmPostSettings",
290  "advanced_editing_frm_post_settings"
291  );
292 
293  $this->tpl->setContent($form->getHTML());
294  }
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAdvancedEditingGUI::getAdminTabs ( )

Definition at line 93 of file class.ilObjAdvancedEditingGUI.php.

References getTabs().

93  : void
94  {
95  $this->getTabs();
96  }
+ Here is the call graph for this function:

◆ getPageObjectKeysWithOptionalHTML()

ilObjAdvancedEditingGUI::getPageObjectKeysWithOptionalHTML ( )
protected

This limits the possibility to allow html for these page objects that supported the feature in the past.

PLEASE do not add additional keys here. The whole feature might be abandonded in the future.

Definition at line 559 of file class.ilObjAdvancedEditingGUI.php.

559  : array
560  {
561  return ["lobj","copa","mep","blp","prtf","prtt","term","lm","qht","qpl","qfbg","qfbs","sahs","stys","cont","cstr","auth"];
562  }

◆ getTabs()

ilObjAdvancedEditingGUI::getTabs ( )
protected

Definition at line 166 of file class.ilObjAdvancedEditingGUI.php.

References addSubtabs(), and ILIAS\Repository\ctrl().

Referenced by getAdminTabs().

166  : void
167  {
168  if ($this->rbac_system->checkAccess("visible,read", $this->object->getRefId())) {
169  $this->tabs_gui->addTarget(
170  "adve_page_editor_settings",
171  $this->ctrl->getLinkTarget($this, "showGeneralPageEditorSettings"),
172  array("showPageEditorSettings", "","view")
173  );
174 
175  $this->tabs_gui->addTarget(
176  "adve_rte_settings",
177  $this->ctrl->getLinkTarget($this, "settings"),
178  array("settings","assessment", "survey", "frmPost", "excass"),
179  "",
180  ""
181  );
182  }
183 
184  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
185  $this->tabs_gui->addTarget(
186  "perm_settings",
187  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
188  array("perm","info","owner"),
189  'ilpermissiongui'
190  );
191  }
192  $this->addSubtabs();
193  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTinyForm()

ilObjAdvancedEditingGUI::getTinyForm ( )

Definition at line 202 of file class.ilObjAdvancedEditingGUI.php.

References $form, ilObjAdvancedEditing\_getRichTextEditor(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by saveSettingsObject(), and settingsObject().

203  {
205  $form = new ilPropertyFormGUI();
206  $form->setFormAction($this->ctrl->getFormAction($this));
207  $form->setTitle($this->lng->txt("adve_activation"));
208  $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_tiny_mce"), "use_tiny");
209  if ($editor === "tinymce") {
210  $cb->setChecked(true);
211  }
212  $form->addItem($cb);
213  if ($this->checkPermissionBool("write")) {
214  $form->addCommandButton("saveSettings", $this->lng->txt("save"));
215  }
216 
217  return $form;
218  }
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGeneralPageSettingsForm()

ilObjAdvancedEditingGUI::initGeneralPageSettingsForm ( )

Definition at line 496 of file class.ilObjAdvancedEditingGUI.php.

References $form, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), ilGlossaryTerm\setShortTextsDirtyGlobally(), and ilPropertyFormGUI\setTitle().

Referenced by saveGeneralPageSettingsObject(), and showGeneralPageEditorSettingsObject().

497  {
498  $form = new ilPropertyFormGUI();
499 
500  $aset = new ilSetting("adve");
501 
502  // use physical character styles
503  $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_physical"), "use_physical");
504  $cb->setInfo($this->lng->txt("adve_use_physical_info"));
505  $cb->setChecked((bool) $aset->get("use_physical"));
506  $form->addItem($cb);
507 
508  // blocking mode
509  $cb = new ilCheckboxInputGUI($this->lng->txt("adve_blocking_mode"), "block_mode_act");
510  $cb->setChecked((bool) $aset->get("block_mode_minutes") > 0);
511  $form->addItem($cb);
512 
513  // number of minutes
514  $ni = new ilNumberInputGUI($this->lng->txt("adve_minutes"), "block_mode_minutes");
515  $ni->setMinValue(2);
516  $ni->setMaxLength(5);
517  $ni->setSize(5);
518  $ni->setRequired(true);
519  $ni->setInfo($this->lng->txt("adve_minutes_info"));
520  $ni->setValue($aset->get("block_mode_minutes"));
521  $cb->addSubItem($ni);
522 
523  // autosave
524  $as = new ilNumberInputGUI($this->lng->txt("adve_autosave"), "autosave");
525  $as->setSuffix($this->lng->txt("seconds"));
526  $as->setMaxLength(5);
527  $as->setSize(5);
528  $as->setInfo($this->lng->txt("adve_autosave_info"));
529  $as->setValue($aset->get("autosave"));
530  $form->addItem($as);
531 
532  // auto url linking
533  $cb = new ilCheckboxInputGUI($this->lng->txt("adve_auto_url_linking"), "auto_url_linking");
534  $cb->setChecked((bool) $aset->get("auto_url_linking"));
535  $cb->setInfo($this->lng->txt("adve_auto_url_linking_info"));
536  $form->addItem($cb);
537 
538  if ($this->checkPermissionBool("write")) {
539  $form->addCommandButton("saveGeneralPageSettings", $this->lng->txt("save"));
540  }
541 
542  // workaround for glossaries to force rewriting of short texts
544 
545 
546  $form->setTitle($this->lng->txt("adve_pe_general"));
547  $form->setFormAction($this->ctrl->getFormAction($this));
548 
549  return $form;
550  }
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static setShortTextsDirtyGlobally()
Set short texts dirty (for all glossaries)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPageEditorForm()

ilObjAdvancedEditingGUI::initPageEditorForm ( )

Definition at line 404 of file class.ilObjAdvancedEditingGUI.php.

References Vendor\Package\$b, ilPageContentGUI\_getCommonBBButtons(), ilObjAssessmentFolder\ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED, ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ILIAS\Repository\lng(), ilPageEditorSettings\lookupSetting(), and ILIAS\Repository\settings().

Referenced by savePageEditorSettingsObject(), and showPageEditorSettingsObject().

404  : void
405  {
406  $this->lng->loadLanguageModule("content");
407 
408  $this->form = new ilPropertyFormGUI();
409 
410  if ($this->cgrp === "test") {
411  $this->form->setTitle($this->lng->txt("adve_activation"));
412  $cb = new ilCheckboxInputGUI($this->lng->txt("advanced_editing_tst_editing"), "tst_page_edit");
413  $cb->setInfo($this->lng->txt("advanced_editing_tst_editing_desc"));
415  $cb->setChecked(true);
416  }
417  $this->form->addItem($cb);
418 
419  $sh = new ilFormSectionHeaderGUI();
420  $sh->setTitle($this->lng->txt("adve_text_content_features"));
421  $this->form->addItem($sh);
422  } elseif ($this->cgrp === "rep") {
423  $this->form->setTitle($this->lng->txt("adve_activation"));
424  $cb = new ilCheckboxInputGUI($this->lng->txt("advanced_editing_rep_page_editing"), "cat_page_edit");
425  $cb->setInfo($this->lng->txt("advanced_editing_rep_page_editing_desc"));
426  if ($this->settings->get("enable_cat_page_edit")) {
427  $cb->setChecked(true);
428  }
429  $this->form->addItem($cb);
430 
431  $sh = new ilFormSectionHeaderGUI();
432  $sh->setTitle($this->lng->txt("adve_text_content_features"));
433  $this->form->addItem($sh);
434  } else {
435  $this->form->setTitle($this->lng->txt("adve_text_content_features"));
436  }
437 
438 
440  foreach ($buttons as $b => $t) {
441  // command button activation
442  $cb = new ilCheckboxInputGUI(str_replace(":", "", $this->lng->txt("cont_text_" . $b)), "active_" . $b);
443  $cb->setChecked((bool) ilPageEditorSettings::lookupSetting($this->cgrp, "active_" . $b, true));
444  $this->form->addItem($cb);
445  }
446 
447  // save and cancel commands
448  if ($this->checkPermissionBool("write")) {
449  $this->form->addCommandButton("savePageEditorSettings", $this->lng->txt("save"));
450  }
451 
452  $this->form->setFormAction($this->ctrl->getFormAction($this));
453  }
static lookupSetting(string $a_grp, string $a_name, string $a_default='0')
Lookup setting.
const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTagsForm()

ilObjAdvancedEditingGUI::initTagsForm ( string  $a_id,
string  $a_cmd,
string  $a_title 
)
protected

Definition at line 334 of file class.ilObjAdvancedEditingGUI.php.

References $form, ilObjAdvancedEditing\_getUsedHTMLTags(), ILIAS\Repository\access(), ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), ilMultiSelectInputGUI\setHeight(), and ilPropertyFormGUI\setTitle().

Referenced by assessmentObject(), excAssObject(), frmPostObject(), saveAssessmentSettingsObject(), saveExcAssSettingsObject(), saveFrmPostSettingsObject(), saveSurveySettingsObject(), and surveyObject().

339  $form = new ilPropertyFormGUI();
340  $form->setFormAction($this->ctrl->getFormAction($this, $a_cmd));
341  $form->setTitle($this->lng->txt($a_title));
342 
343  $alltags = $this->object->getHTMLTags();
344  $alltags = array_combine($alltags, $alltags);
345 
346  $tags = new ilMultiSelectInputGUI($this->lng->txt("advanced_editing_allow_html_tags"), "html_tags");
347  $tags->setHeight(400);
348  $tags->enableSelectAll(true);
349  $tags->enableSelectedFirst(true);
350  $tags->setOptions($alltags);
351  $tags->setValue(ilObjAdvancedEditing::_getUsedHTMLTags($a_id));
352  $form->addItem($tags);
353 
354  if ($this->access->checkAccess("write", "", $this->object->getRefId())) {
355  $form->addCommandButton($a_cmd, $this->lng->txt("save"));
356  }
357 
358  return $form;
359  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveAssessmentSettingsObject()

ilObjAdvancedEditingGUI::saveAssessmentSettingsObject ( )

Definition at line 248 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), initTagsForm(), saveTags(), and ilPropertyFormGUI\setValuesByPost().

248  : void
249  {
250  $form = $this->initTagsForm(
251  "assessment",
252  "saveAssessmentSettings",
253  "advanced_editing_assessment_settings"
254  );
255  if (!$this->saveTags("assessment", "assessment", $form)) {
257  $this->tpl->setContent($form->getHTML());
258  }
259  }
saveTags(string $a_id, string $a_cmd, ilPropertyFormGUI $form)
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ saveExcAssSettingsObject()

ilObjAdvancedEditingGUI::saveExcAssSettingsObject ( )

Definition at line 320 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), initTagsForm(), saveTags(), and ilPropertyFormGUI\setValuesByPost().

320  : void
321  {
322  $form = $this->initTagsForm(
323  "exc_ass",
324  "saveExcAssSettings",
325  "advanced_editing_excass_settings"
326  );
327  if (!$this->saveTags("exc_ass", "excAss", $form)) {
329  $this->tpl->setContent($form->getHTML());
330  }
331  }
saveTags(string $a_id, string $a_cmd, ilPropertyFormGUI $form)
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ saveFrmPostSettingsObject()

ilObjAdvancedEditingGUI::saveFrmPostSettingsObject ( )

Definition at line 296 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), initTagsForm(), saveTags(), and ilPropertyFormGUI\setValuesByPost().

296  : void
297  {
298  $form = $this->initTagsForm(
299  "frm_post",
300  "saveFrmPostSettings",
301  "advanced_editing_frm_post_settings"
302  );
303  if (!$this->saveTags("frm_post", "frmPost", $form)) {
305  $this->tpl->setContent($form->getHTML());
306  }
307  }
saveTags(string $a_id, string $a_cmd, ilPropertyFormGUI $form)
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ saveGeneralPageSettingsObject()

ilObjAdvancedEditingGUI::saveGeneralPageSettingsObject ( )

Definition at line 564 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), initGeneralPageSettingsForm(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and ilPropertyFormGUI\setValuesByPost().

564  : void
565  {
566  $this->checkPermission("write");
567 
569  if ($form->checkInput()) {
570  $autosave = (int) $form->getInput("autosave");
571  $ok = true;
572 
573  // autosave must be greater 10, if activated
574  if ($autosave > 0 && $autosave < 10) {
575  $form->getItemByPostVar("autosave")->setAlert($this->lng->txt("adve_autosave_info_min_10"));
576  $ok = false;
577  }
578 
579  if ($ok) {
580  $aset = new ilSetting("adve");
581  $aset->set("use_physical", $form->getInput("use_physical"));
582  if ($form->getInput("block_mode_act")) {
583  $aset->set("block_mode_minutes", (string) (int) $form->getInput("block_mode_minutes"));
584  } else {
585  $aset->set("block_mode_minutes", 0);
586  }
587  $aset->set("auto_url_linking", $form->getInput("auto_url_linking"));
588 
589  $aset->set("autosave", $form->getInput("autosave"));
590 
591  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
592  $this->ctrl->redirect($this, "showGeneralPageEditorSettings");
593  }
594  }
595 
597  $this->tpl->setContent($form->getHTML());
598  }
getItemByPostVar(string $a_post_var)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveObject()

ilObjAdvancedEditingGUI::saveObject ( )

Definition at line 82 of file class.ilObjAdvancedEditingGUI.php.

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

82  : void
83  {
84  $this->checkPermission("write");
85 
86  parent::saveObject();
87 
88  // always send a message
89  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
90  $this->ctrl->redirect($this);
91  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ savePageEditorSettingsObject()

ilObjAdvancedEditingGUI::savePageEditorSettingsObject ( )

Definition at line 455 of file class.ilObjAdvancedEditingGUI.php.

References Vendor\Package\$b, ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, ilPageContentGUI\_getCommonBBButtons(), ilObjectGUI\checkPermission(), ILIAS\Repository\form(), initPageEditorForm(), ilLanguage\txt(), and ilPageEditorSettings\writeSetting().

455  : void
456  {
457  $lng = $this->lng;
458  $ilCtrl = $this->ctrl;
460 
461  $this->checkPermission("write");
462 
463  $this->initPageEditorForm();
464  if ($this->form->checkInput()) {
466  foreach ($buttons as $b => $t) {
468  $this->std_request->getGroup(),
469  "active_" . $b,
470  $this->form->getInput("active_" . $b)
471  );
472  }
473 
474  if ($this->std_request->getGroup() === "test") {
475  $ilSetting->set("enable_tst_page_edit", (string) $this->form->getInput("tst_page_edit"));
476  } elseif ($this->std_request->getGroup() === "rep") {
477  $ilSetting->set("enable_cat_page_edit", (string) $this->form->getInput("cat_page_edit"));
478  }
479 
480  $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
481  }
482 
483  $ilCtrl->setParameter($this, "grp", $this->std_request->getGroup());
484  $ilCtrl->redirect($this, "showPageEditorSettings");
485  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static writeSetting(string $a_grp, string $a_name, string $a_value)
Write Setting.
ilLanguage $lng
form( $class_path, string $cmd, string $submit_caption="")
global $ilSetting
Definition: privfeed.php:18
ilSetting $settings
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjAdvancedEditingGUI::saveSettingsObject ( )

Definition at line 220 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getInput(), getTinyForm(), and ILIAS\Repository\lng().

220  : void
221  {
222  $this->checkPermission("write");
223 
224  $form = $this->getTinyForm();
225  $form->checkInput();
226 
227  if ($form->getInput("use_tiny")) {
228  $this->object->setRichTextEditor("tinymce");
229  } else {
230  $this->object->setRichTextEditor("");
231  }
232  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
233 
234  $this->ctrl->redirect($this, 'settings');
235  }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveSurveySettingsObject()

ilObjAdvancedEditingGUI::saveSurveySettingsObject ( )

Definition at line 272 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), initTagsForm(), saveTags(), and ilPropertyFormGUI\setValuesByPost().

272  : void
273  {
274  $form = $this->initTagsForm(
275  "survey",
276  "saveSurveySettings",
277  "advanced_editing_survey_settings"
278  );
279  if (!$this->saveTags("survey", "survey", $form)) {
281  $this->tpl->setContent($form->getHTML());
282  }
283  }
saveTags(string $a_id, string $a_cmd, ilPropertyFormGUI $form)
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

◆ saveTags()

ilObjAdvancedEditingGUI::saveTags ( string  $a_id,
string  $a_cmd,
ilPropertyFormGUI  $form 
)
protected

Definition at line 361 of file class.ilObjAdvancedEditingGUI.php.

References Vendor\Package\$e, ilPropertyFormGUI\checkInput(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getInput(), and ILIAS\Repository\lng().

Referenced by saveAssessmentSettingsObject(), saveExcAssSettingsObject(), saveFrmPostSettingsObject(), and saveSurveySettingsObject().

365  : bool {
366  $this->checkPermission("write");
367  try {
368  if ($form->checkInput()) {
369  $html_tags = $form->getInput("html_tags");
370  // get rid of select all
371  if (array_key_exists(0, $html_tags) && (string) $html_tags[0] === '') {
372  unset($html_tags[0]);
373  }
374  $this->object->setUsedHTMLTags((array) $html_tags, $a_id);
375  $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
376  } else {
377  return false;
378  }
380  $this->tpl->setOnScreenMessage('info', $e->getMessage(), true);
381  }
382  $this->ctrl->redirect($this, $a_cmd);
383  return true;
384  }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settingsObject()

ilObjAdvancedEditingGUI::settingsObject ( )

Definition at line 195 of file class.ilObjAdvancedEditingGUI.php.

References ilObjectGUI\$tpl, ilPropertyFormGUI\getHTML(), getTinyForm(), and ilGlobalTemplateInterface\setContent().

195  : void
196  {
197  $tpl = $this->tpl;
198  $form = $this->getTinyForm();
200  }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ showGeneralPageEditorSettingsObject()

ilObjAdvancedEditingGUI::showGeneralPageEditorSettingsObject ( )

Definition at line 487 of file class.ilObjAdvancedEditingGUI.php.

References addPageEditorSettingsSubtabs(), ilPropertyFormGUI\getHTML(), and initGeneralPageSettingsForm().

487  : void
488  {
490  $this->tabs_gui->activateTab("adve_page_editor_settings");
491 
493  $this->tpl->setContent($form->getHTML());
494  }
+ Here is the call graph for this function:

◆ showPageEditorSettingsObject()

ilObjAdvancedEditingGUI::showPageEditorSettingsObject ( )

Definition at line 386 of file class.ilObjAdvancedEditingGUI.php.

References addPageEditorSettingsSubtabs(), ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilPageEditorSettings\getGroups(), and initPageEditorForm().

386  : void
387  {
389 
391 
392  $this->cgrp = $this->std_request->getGroup();
393  if ($this->cgrp === "") {
394  $this->cgrp = (string) key($grps);
395  }
396 
397  $this->ctrl->setParameter($this, "grp", $this->cgrp);
398  $this->tabs_gui->setSubTabActive("adve_grp_" . $this->cgrp);
399 
400  $this->initPageEditorForm();
401  $this->tpl->setContent($this->form->getHTML());
402  }
static getGroups()
Get all settings groups.
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ surveyObject()

ilObjAdvancedEditingGUI::surveyObject ( )

Definition at line 261 of file class.ilObjAdvancedEditingGUI.php.

References ilPropertyFormGUI\getHTML(), and initTagsForm().

261  : void
262  {
263  $form = $this->initTagsForm(
264  "survey",
265  "saveSurveySettings",
266  "advanced_editing_survey_settings"
267  );
268 
269  $this->tpl->setContent($form->getHTML());
270  }
initTagsForm(string $a_id, string $a_cmd, string $a_title)
+ Here is the call graph for this function:

Field Documentation

◆ $cgrp

string ilObjAdvancedEditingGUI::$cgrp = ""
protected

Definition at line 30 of file class.ilObjAdvancedEditingGUI.php.

◆ $component_repository

ilComponentRepository ilObjAdvancedEditingGUI::$component_repository
protected

Definition at line 32 of file class.ilObjAdvancedEditingGUI.php.

◆ $form

ilPropertyFormGUI ilObjAdvancedEditingGUI::$form
protected

◆ $std_request

StandardGUIRequest ilObjAdvancedEditingGUI::$std_request
protected

Definition at line 31 of file class.ilObjAdvancedEditingGUI.php.


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