ILIAS  release_8 Revision v8.24
ilObjAdvancedEditingGUI Class Reference

Class ilObjAdvancedEditingGUI. More...

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

Public Member Functions

 executeCommand ()
 
 saveObject ()
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 addSubtabs ()
 
 addPageEditorSettingsSubtabs ()
 
 settingsObject ()
 
 getTinyForm ()
 
 saveSettingsObject ()
 
 assessmentObject ()
 
 saveAssessmentSettingsObject ()
 
 surveyObject ()
 
 saveSurveySettingsObject ()
 
 frmPostObject ()
 
 saveFrmPostSettingsObject ()
 
 excAssObject ()
 
 saveExcAssSettingsObject ()
 
 showPageEditorSettingsObject ()
 
 initPageEditorForm ()
 
 savePageEditorSettingsObject ()
 
 showGeneralPageEditorSettingsObject ()
 
 initGeneralPageSettingsForm ()
 
 saveGeneralPageSettingsObject ()
 
 initCharSelectorSettingsForm (ilCharSelectorGUI $char_selector)
 
 showCharSelectorSettingsObject ()
 Show the settings for the selector of unicode characters. More...
 
 saveCharSelectorSettingsObject ()
 Save the settings for the selector of unicode characters. More...
 
- 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] don't belong to the current 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...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 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 ()
 @abstract overwrite in derived GUI class of your object type More...
 
 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 ()
 
 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...
 
 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 ()
 @abstract 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...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. 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...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container 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
 
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 144 of file class.ilObjAdvancedEditingGUI.php.

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

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

+ Here is the call graph for this function:

◆ addSubtabs()

ilObjAdvancedEditingGUI::addSubtabs ( )

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

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

References ILIAS\Repository\ctrl().

Referenced by getTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assessmentObject()

ilObjAdvancedEditingGUI::assessmentObject ( )

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

242 : void
243 {
244 $form = $this->initTagsForm(
245 "assessment",
246 "saveAssessmentSettings",
247 "advanced_editing_assessment_settings"
248 );
249
250 $this->tpl->setContent($form->getHTML());
251 }
initTagsForm(string $a_id, string $a_cmd, string $a_title)

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

+ Here is the call graph for this function:

◆ excAssObject()

ilObjAdvancedEditingGUI::excAssObject ( )

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

314 : void
315 {
316 $form = $this->initTagsForm(
317 "exc_ass",
318 "saveExcAssSettings",
319 "advanced_editing_excass_settings"
320 );
321
322 $this->tpl->setContent($form->getHTML());
323 }

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

+ Here is the call graph for this function:

◆ executeCommand()

ilObjAdvancedEditingGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

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

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

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

+ Here is the call graph for this function:

◆ frmPostObject()

ilObjAdvancedEditingGUI::frmPostObject ( )

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

290 : void
291 {
292 $form = $this->initTagsForm(
293 "frm_post",
294 "saveFrmPostSettings",
295 "advanced_editing_frm_post_settings"
296 );
297
298 $this->tpl->setContent($form->getHTML());
299 }

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

+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjAdvancedEditingGUI::getAdminTabs ( )

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

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

91 : void
92 {
93 $this->getTabs();
94 }
getTabs()
@abstract overwrite in derived GUI class of your object type

References getTabs().

+ 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 564 of file class.ilObjAdvancedEditingGUI.php.

564 : array
565 {
566 return ["lobj","copa","mep","blp","prtf","prtt","gdf","lm","qht","qpl","qfbg","qfbs","sahs","stys","cont","cstr","auth"];
567 }

◆ getTabs()

ilObjAdvancedEditingGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

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

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

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

Referenced by getAdminTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTinyForm()

ilObjAdvancedEditingGUI::getTinyForm ( )

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

208 {
210 $form = new ilPropertyFormGUI();
211 $form->setFormAction($this->ctrl->getFormAction($this));
212 $form->setTitle($this->lng->txt("adve_activation"));
213 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_tiny_mce"), "use_tiny");
214 if ($editor === "tinymce") {
215 $cb->setChecked(true);
216 }
217 $form->addItem($cb);
218 if ($this->checkPermissionBool("write")) {
219 $form->addCommandButton("saveSettings", $this->lng->txt("save"));
220 }
221
222 return $form;
223 }
This class represents a checkbox property in a property form.
setFormAction(string $a_formaction)
static _getRichTextEditor()
Returns the identifier for the Rich Text Editor.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
This class represents a property form user interface.
addCommandButton(string $a_cmd, string $a_text, string $a_id="")

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCharSelectorSettingsForm()

ilObjAdvancedEditingGUI::initCharSelectorSettingsForm ( ilCharSelectorGUI  $char_selector)

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

606 {
607 $form = new ilPropertyFormGUI();
608 $form->setTitle($this->lng->txt('settings'));
609 $form->setFormAction($this->ctrl->getFormAction($this));
610 if ($this->checkPermissionBool("write")) {
611 $form->addCommandButton("saveCharSelectorSettings", $this->lng->txt("save"));
612 }
613 $char_selector->addFormProperties($form);
614
615 return $form;
616 }
addFormProperties(ilPropertyFormGUI $a_form)
add the configuration elements to a property form

References ilPropertyFormGUI\addCommandButton(), ilCharSelectorGUI\addFormProperties(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

+ Here is the call graph for this function:

◆ initGeneralPageSettingsForm()

ilObjAdvancedEditingGUI::initGeneralPageSettingsForm ( )

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

502 {
503 $form = new ilPropertyFormGUI();
504
505 $aset = new ilSetting("adve");
506
507 // use physical character styles
508 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_use_physical"), "use_physical");
509 $cb->setInfo($this->lng->txt("adve_use_physical_info"));
510 $cb->setChecked((bool) $aset->get("use_physical"));
511 $form->addItem($cb);
512
513 // blocking mode
514 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_blocking_mode"), "block_mode_act");
515 $cb->setChecked((bool) $aset->get("block_mode_minutes") > 0);
516 $form->addItem($cb);
517
518 // number of minutes
519 $ni = new ilNumberInputGUI($this->lng->txt("adve_minutes"), "block_mode_minutes");
520 $ni->setMinValue(2);
521 $ni->setMaxLength(5);
522 $ni->setSize(5);
523 $ni->setRequired(true);
524 $ni->setInfo($this->lng->txt("adve_minutes_info"));
525 $ni->setValue($aset->get("block_mode_minutes"));
526 $cb->addSubItem($ni);
527
528 // autosave
529 $as = new ilNumberInputGUI($this->lng->txt("adve_autosave"), "autosave");
530 $as->setSuffix($this->lng->txt("seconds"));
531 $as->setMaxLength(5);
532 $as->setSize(5);
533 $as->setInfo($this->lng->txt("adve_autosave_info"));
534 $as->setValue($aset->get("autosave"));
535 $form->addItem($as);
536
537 // auto url linking
538 $cb = new ilCheckboxInputGUI($this->lng->txt("adve_auto_url_linking"), "auto_url_linking");
539 $cb->setChecked((bool) $aset->get("auto_url_linking"));
540 $cb->setInfo($this->lng->txt("adve_auto_url_linking_info"));
541 $form->addItem($cb);
542
543 if ($this->checkPermissionBool("write")) {
544 $form->addCommandButton("saveGeneralPageSettings", $this->lng->txt("save"));
545 }
546
547 // workaround for glossaries to force rewriting of short texts
549
550
551 $form->setTitle($this->lng->txt("adve_pe_general"));
552 $form->setFormAction($this->ctrl->getFormAction($this));
553
554 return $form;
555 }
static setShortTextsDirtyGlobally()
Set short texts dirty (for all glossaries)
This class represents a number property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), ilGlossaryDefinition\setShortTextsDirtyGlobally(), and ilPropertyFormGUI\setTitle().

+ Here is the call graph for this function:

◆ initPageEditorForm()

ilObjAdvancedEditingGUI::initPageEditorForm ( )

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

409 : void
410 {
411 $this->lng->loadLanguageModule("content");
412
413 $this->form = new ilPropertyFormGUI();
414
415 if ($this->cgrp === "test") {
416 $this->form->setTitle($this->lng->txt("adve_activation"));
417 $cb = new ilCheckboxInputGUI($this->lng->txt("advanced_editing_tst_editing"), "tst_page_edit");
418 $cb->setInfo($this->lng->txt("advanced_editing_tst_editing_desc"));
420 $cb->setChecked(true);
421 }
422 $this->form->addItem($cb);
423
424 $sh = new ilFormSectionHeaderGUI();
425 $sh->setTitle($this->lng->txt("adve_text_content_features"));
426 $this->form->addItem($sh);
427 } elseif ($this->cgrp === "rep") {
428 $this->form->setTitle($this->lng->txt("adve_activation"));
429 $cb = new ilCheckboxInputGUI($this->lng->txt("advanced_editing_rep_page_editing"), "cat_page_edit");
430 $cb->setInfo($this->lng->txt("advanced_editing_rep_page_editing_desc"));
431 if ($this->settings->get("enable_cat_page_edit")) {
432 $cb->setChecked(true);
433 }
434 $this->form->addItem($cb);
435
436 $sh = new ilFormSectionHeaderGUI();
437 $sh->setTitle($this->lng->txt("adve_text_content_features"));
438 $this->form->addItem($sh);
439 } else {
440 $this->form->setTitle($this->lng->txt("adve_text_content_features"));
441 }
442
443
445 foreach ($buttons as $b => $t) {
446 // command button activation
447 $cb = new ilCheckboxInputGUI(str_replace(":", "", $this->lng->txt("cont_text_" . $b)), "active_" . $b);
448 $cb->setChecked((bool) ilPageEditorSettings::lookupSetting($this->cgrp, "active_" . $b, true));
449 $this->form->addItem($cb);
450 }
451
452 // save and cancel commands
453 if ($this->checkPermissionBool("write")) {
454 $this->form->addCommandButton("savePageEditorSettings", $this->lng->txt("save"));
455 }
456
457 $this->form->setFormAction($this->ctrl->getFormAction($this));
458 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const ADDITIONAL_QUESTION_CONTENT_EDITING_MODE_PAGE_OBJECT_DISABLED
static lookupSetting(string $a_grp, string $a_name, string $a_default='0')
Lookup setting.
form( $class_path, string $cmd)

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

+ Here is the call graph for this function:

◆ initTagsForm()

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

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

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

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

+ Here is the caller graph for this function:

◆ saveAssessmentSettingsObject()

ilObjAdvancedEditingGUI::saveAssessmentSettingsObject ( )

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

253 : void
254 {
255 $form = $this->initTagsForm(
256 "assessment",
257 "saveAssessmentSettings",
258 "advanced_editing_assessment_settings"
259 );
260 if (!$this->saveTags("assessment", "assessment", $form)) {
262 $this->tpl->setContent($form->getHTML());
263 }
264 }
saveTags(string $a_id, string $a_cmd, ilPropertyFormGUI $form)

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

+ Here is the call graph for this function:

◆ saveCharSelectorSettingsObject()

ilObjAdvancedEditingGUI::saveCharSelectorSettingsObject ( )

Save the settings for the selector of unicode characters.

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

638 : void
639 {
640 $this->checkPermission("write");
641
643 $form = $this->initCharSelectorSettingsForm($char_selector);
644 if ($form->checkInput()) {
645 $char_selector->getFormValues($form);
646
647 $this->settings->set('char_selector_availability', $char_selector->getConfig()->getAvailability());
648 $this->settings->set('char_selector_definition', $char_selector->getConfig()->getDefinition());
649
650 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
651 $this->ctrl->redirect($this, "showCharSelectorSettings");
652 }
654 $this->tpl->setContent($form->getHTML());
655 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initCharSelectorSettingsForm(ilCharSelectorGUI $char_selector)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References ilPropertyFormGUI\checkInput(), ilCharSelectorConfig\CONTEXT_ADMIN, ILIAS\Repository\ctrl(), ilPropertyFormGUI\getHTML(), ILIAS\Repository\lng(), ILIAS\Repository\settings(), and ilPropertyFormGUI\setValuesByPost().

+ Here is the call graph for this function:

◆ saveExcAssSettingsObject()

ilObjAdvancedEditingGUI::saveExcAssSettingsObject ( )

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

325 : void
326 {
327 $form = $this->initTagsForm(
328 "exc_ass",
329 "saveExcAssSettings",
330 "advanced_editing_excass_settings"
331 );
332 if (!$this->saveTags("exc_ass", "excAss", $form)) {
334 $this->tpl->setContent($form->getHTML());
335 }
336 }

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

+ Here is the call graph for this function:

◆ saveFrmPostSettingsObject()

ilObjAdvancedEditingGUI::saveFrmPostSettingsObject ( )

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

301 : void
302 {
303 $form = $this->initTagsForm(
304 "frm_post",
305 "saveFrmPostSettings",
306 "advanced_editing_frm_post_settings"
307 );
308 if (!$this->saveTags("frm_post", "frmPost", $form)) {
310 $this->tpl->setContent($form->getHTML());
311 }
312 }

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

+ Here is the call graph for this function:

◆ saveGeneralPageSettingsObject()

ilObjAdvancedEditingGUI::saveGeneralPageSettingsObject ( )

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

569 : void
570 {
571 $this->checkPermission("write");
572
574 if ($form->checkInput()) {
575 $autosave = (int) $form->getInput("autosave");
576 $ok = true;
577
578 // autosave must be greater 10, if activated
579 if ($autosave > 0 && $autosave < 10) {
580 $form->getItemByPostVar("autosave")->setAlert($this->lng->txt("adve_autosave_info_min_10"));
581 $ok = false;
582 }
583
584 if ($ok) {
585 $aset = new ilSetting("adve");
586 $aset->set("use_physical", $form->getInput("use_physical"));
587 if ($form->getInput("block_mode_act")) {
588 $aset->set("block_mode_minutes", (string) (int) $form->getInput("block_mode_minutes"));
589 } else {
590 $aset->set("block_mode_minutes", 0);
591 }
592 $aset->set("auto_url_linking", $form->getInput("auto_url_linking"));
593
594 $aset->set("autosave", $form->getInput("autosave"));
595
596 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
597 $this->ctrl->redirect($this, "showGeneralPageEditorSettings");
598 }
599 }
600
602 $this->tpl->setContent($form->getHTML());
603 }
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-...
getItemByPostVar(string $a_post_var)

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

+ Here is the call graph for this function:

◆ saveObject()

ilObjAdvancedEditingGUI::saveObject ( )

Reimplemented from ilObjectGUI.

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

80 : void
81 {
82 $this->checkPermission("write");
83
84 parent::saveObject();
85
86 // always send a message
87 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
88 $this->ctrl->redirect($this);
89 }

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

+ Here is the call graph for this function:

◆ savePageEditorSettingsObject()

ilObjAdvancedEditingGUI::savePageEditorSettingsObject ( )

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

460 : void
461 {
463 $ilCtrl = $this->ctrl;
465
466 $this->checkPermission("write");
467
468 $this->initPageEditorForm();
469 if ($this->form->checkInput()) {
471 foreach ($buttons as $b => $t) {
473 $this->std_request->getGroup(),
474 "active_" . $b,
475 $this->form->getInput("active_" . $b)
476 );
477 }
478
479 if ($this->std_request->getGroup() === "test") {
480 $ilSetting->set("enable_tst_page_edit", (string) $this->form->getInput("tst_page_edit"));
481 } elseif ($this->std_request->getGroup() === "rep") {
482 $ilSetting->set("enable_cat_page_edit", (string) $this->form->getInput("cat_page_edit"));
483 }
484
485 $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
486 }
487
488 $ilCtrl->setParameter($this, "grp", $this->std_request->getGroup());
489 $ilCtrl->redirect($this, "showPageEditorSettings");
490 }
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...
ilSetting $settings
ilLanguage $lng
static writeSetting(string $a_grp, string $a_name, string $a_value)
Write Setting.
global $ilSetting
Definition: privfeed.php:17

References Vendor\Package\$b, $ilSetting, $lng, ILIAS\LTI\ToolProvider\$settings, ilPageContentGUI\_getCommonBBButtons(), ILIAS\Repository\form(), and ilPageEditorSettings\writeSetting().

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjAdvancedEditingGUI::saveSettingsObject ( )

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

225 : void
226 {
227 $this->checkPermission("write");
228
229 $form = $this->getTinyForm();
230 $form->checkInput();
231
232 if ($form->getInput("use_tiny")) {
233 $this->object->setRichTextEditor("tinymce");
234 } else {
235 $this->object->setRichTextEditor("");
236 }
237 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
238
239 $this->ctrl->redirect($this, 'settings');
240 }

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

+ Here is the call graph for this function:

◆ saveSurveySettingsObject()

ilObjAdvancedEditingGUI::saveSurveySettingsObject ( )

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

277 : void
278 {
279 $form = $this->initTagsForm(
280 "survey",
281 "saveSurveySettings",
282 "advanced_editing_survey_settings"
283 );
284 if (!$this->saveTags("survey", "survey", $form)) {
286 $this->tpl->setContent($form->getHTML());
287 }
288 }

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

+ Here is the call graph for this function:

◆ saveTags()

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

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

370 : bool {
371 $this->checkPermission("write");
372 try {
373 if ($form->checkInput()) {
374 $html_tags = $form->getInput("html_tags");
375 // get rid of select all
376 if (array_key_exists(0, $html_tags) && (string) $html_tags[0] === '') {
377 unset($html_tags[0]);
378 }
379 $this->object->setUsedHTMLTags((array) $html_tags, $a_id);
380 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_obj_modified'), true);
381 } else {
382 return false;
383 }
385 $this->tpl->setOnScreenMessage('info', $e->getMessage(), true);
386 }
387 $this->ctrl->redirect($this, $a_cmd);
388 return true;
389 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), and ILIAS\Repository\lng().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ settingsObject()

ilObjAdvancedEditingGUI::settingsObject ( )

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

200 : void
201 {
203 $form = $this->getTinyForm();
205 }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

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

+ Here is the call graph for this function:

◆ showCharSelectorSettingsObject()

ilObjAdvancedEditingGUI::showCharSelectorSettingsObject ( )

Show the settings for the selector of unicode characters.

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

622 : void
623 {
624 $this->tabs_gui->activateTab("adve_char_selector_settings");
625
627 $char_selector->getConfig()->setAvailability((int) $this->settings->get('char_selector_availability'));
628 $char_selector->getConfig()->setDefinition((string) $this->settings->get('char_selector_definition'));
629 $form = $this->initCharSelectorSettingsForm($char_selector);
630 $char_selector->setFormValues($form);
631 $this->tpl->setContent($form->getHTML());
632 }

References ilCharSelectorConfig\CONTEXT_ADMIN, ilPropertyFormGUI\getHTML(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

◆ showGeneralPageEditorSettingsObject()

ilObjAdvancedEditingGUI::showGeneralPageEditorSettingsObject ( )

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

492 : void
493 {
495 $this->tabs_gui->activateTab("adve_page_editor_settings");
496
498 $this->tpl->setContent($form->getHTML());
499 }

References ilPropertyFormGUI\getHTML().

+ Here is the call graph for this function:

◆ showPageEditorSettingsObject()

ilObjAdvancedEditingGUI::showPageEditorSettingsObject ( )

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

391 : void
392 {
394
396
397 $this->cgrp = $this->std_request->getGroup();
398 if ($this->cgrp === "") {
399 $this->cgrp = (string) key($grps);
400 }
401
402 $this->ctrl->setParameter($this, "grp", $this->cgrp);
403 $this->tabs_gui->setSubTabActive("adve_grp_" . $this->cgrp);
404
405 $this->initPageEditorForm();
406 $this->tpl->setContent($this->form->getHTML());
407 }

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

+ Here is the call graph for this function:

◆ surveyObject()

ilObjAdvancedEditingGUI::surveyObject ( )

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

266 : void
267 {
268 $form = $this->initTagsForm(
269 "survey",
270 "saveSurveySettings",
271 "advanced_editing_survey_settings"
272 );
273
274 $this->tpl->setContent($form->getHTML());
275 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $cgrp

string ilObjAdvancedEditingGUI::$cgrp = ""
protected

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

◆ $component_repository

ilComponentRepository ilObjAdvancedEditingGUI::$component_repository
protected

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

◆ $form

◆ $std_request

StandardGUIRequest ilObjAdvancedEditingGUI::$std_request
protected

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


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