ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjNotesSettingsGUI Class Reference

Notes Settings. More...

+ Inheritance diagram for ilObjNotesSettingsGUI:
+ Collaboration diagram for ilObjNotesSettingsGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Contructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getAdminTabs ()
 Get tabs. More...
 
 editSettings ()
 Edit settings. More...
 
 initForm ()
 Init settings form. More...
 
 saveSettings ()
 Save settings. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Attributes

 $rbacsystem
 
 $error
 
 $request
 
 $tabs
 
 $ui
 
 $setting
 
 $main_tpl
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjNotesSettingsGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference = true,
  $a_prepare_output = true 
)

Contructor.

public

Definition at line 57 of file class.ilObjNotesSettingsGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ui().

58  {
59  global $DIC;
60 
61  $this->lng = $DIC->language();
62  $this->rbacsystem = $DIC->rbac()->system();
63  $this->error = $DIC["ilErr"];
64  $this->ctrl = $DIC->ctrl();
65  $this->request = $DIC->http()->request();
66  $this->tabs = $DIC->tabs();
67  $this->ui = $DIC->ui();
68  $this->setting = $DIC->settings();
69  $this->main_tpl = $DIC->ui()->mainTemplate();
70 
71  $this->type = 'nots';
72 
73  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
74 
75  $this->lng->loadLanguageModule("note");
76  }
global $DIC
Definition: goto.php:24
ui()
Definition: ui.php:5
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ editSettings()

ilObjNotesSettingsGUI::editSettings ( )

Edit settings.

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

References $main_tpl, $tabs, $ui, and initForm().

146  {
148  $ui = $this->ui;
149  $tabs = $this->tabs;
150 
151  $tabs->activateTab("settings");
152 
153  $form = $this->initForm();
154  $main_tpl->setContent($ui->renderer()->render($form));
155  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjNotesSettingsGUI::executeCommand ( )

Execute command.

Exceptions
ilCtrlException

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

References ilObjectGUI\$ctrl, $rbacsystem, $tabs, and ilObjectGUI\prepareOutput().

83  {
87 
88  $next_class = $ctrl->getNextClass($this);
89  $cmd = $ctrl->getCmd("editSettings");
90 
91  if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
92  $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
93  }
94 
95  $this->prepareOutput();
96 
97  switch ($next_class) {
98  case 'ilpermissiongui':
99  $tabs->activateTab('perm_settings');
100  $perm_gui = new ilPermissionGUI($this);
101  $ctrl->forwardCommand($perm_gui);
102  break;
103 
104  default:
105  if ($cmd == "view") {
106  $cmd = "editSettings";
107  }
108  if (in_array($cmd, ["editSettings", "saveSettings"])) {
109  $this->$cmd();
110  }
111  break;
112  }
113  }
prepareOutput($a_show_subobjects=true)
prepare output
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjNotesSettingsGUI::getAdminTabs ( )

Get tabs.

Definition at line 118 of file class.ilObjNotesSettingsGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $rbacsystem, and $tabs.

119  {
121  $lng = $this->lng;
122  $tabs = $this->tabs;
123  $ctrl = $this->ctrl;
124 
125  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
126  $tabs->addTab(
127  "settings",
128  $lng->txt("settings"),
129  $ctrl->getLinkTarget($this, "editSettings")
130  );
131  }
132 
133  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
134  $tabs->addTab(
135  "perm_settings",
136  $lng->txt("perm_settings"),
137  $ctrl->getLinkTargetByClass('ilpermissiongui', "perm")
138  );
139  }
140  }

◆ initForm()

ilObjNotesSettingsGUI::initForm ( )

Init settings form.

Returns

Definition at line 161 of file class.ilObjNotesSettingsGUI.php.

References ilObjectGUI\$ctrl, Vendor\Package\$f, ilObjectGUI\$lng, $setting, and $ui.

Referenced by editSettings(), and saveSettings().

162  {
163  $ui = $this->ui;
164  $f = $ui->factory();
165  $ctrl = $this->ctrl;
166  $lng = $this->lng;
168 
169  $fields["enable_notes"] = $f->input()->field()->checkbox($lng->txt("note_enable_notes"))
170  ->withValue(!($setting->get("disable_notes")));
171 
172  // section
173  $section1 = $f->input()->field()->section($fields, $lng->txt("settings"));
174 
175  $form_action = $ctrl->getLinkTarget($this, "saveSettings");
176  return $f->input()->container()->form()->standard($form_action, ["sec" => $section1]);
177  }
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjNotesSettingsGUI::saveSettings ( )

Save settings.

Definition at line 182 of file class.ilObjNotesSettingsGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$data, ilObjectGUI\$lng, $request, $setting, initForm(), and ilUtil\sendInfo().

183  {
185  $form = $this->initForm();
186  $lng = $this->lng;
187  $ctrl = $this->ctrl;
189 
190  if ($request->getMethod() == "POST") {
191  $form = $form->withRequest($request);
192  $data = $form->getData();
193  if (is_array($data["sec"])) {
194  $setting->set("disable_notes", (int) ($data["sec"]["enable_notes"] ? 0 : 1));
195  ilUtil::sendInfo($lng->txt("msg_obj_modified"), true);
196  }
197  }
198  $ctrl->redirect($this, "editSettings");
199  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjNotesSettingsGUI::$error
protected

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

◆ $main_tpl

ilObjNotesSettingsGUI::$main_tpl
protected

Definition at line 49 of file class.ilObjNotesSettingsGUI.php.

Referenced by editSettings().

◆ $rbacsystem

ilObjNotesSettingsGUI::$rbacsystem
protected

Definition at line 18 of file class.ilObjNotesSettingsGUI.php.

Referenced by executeCommand(), and getAdminTabs().

◆ $request

ilObjNotesSettingsGUI::$request
protected

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

Referenced by saveSettings().

◆ $setting

ilObjNotesSettingsGUI::$setting
protected

Definition at line 44 of file class.ilObjNotesSettingsGUI.php.

Referenced by initForm(), and saveSettings().

◆ $tabs

ilObjNotesSettingsGUI::$tabs
protected

Definition at line 33 of file class.ilObjNotesSettingsGUI.php.

Referenced by editSettings(), executeCommand(), and getAdminTabs().

◆ $ui

ilObjNotesSettingsGUI::$ui
protected

Definition at line 38 of file class.ilObjNotesSettingsGUI.php.

Referenced by editSettings(), and initForm().


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