ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjDashboardSettingsGUI Class Reference

Dashboard settings. More...

+ Inheritance diagram for ilObjDashboardSettingsGUI:
+ Collaboration diagram for ilObjDashboardSettingsGUI:

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 personal desktop settings. More...
 
 initForm ()
 Init form. More...
 
 saveSettings ()
 Save personal desktop settings. More...
 
 setSettingsSubTabs ($a_active)
 Get tabs. 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 ()
 

Protected Member Functions

 editViewCoursesGroups ()
 Edit settings of courses and groups overview. More...
 
 getViewSettingsForm (int $view)
 Get view courses and groups settings form. More...
 
 saveViewCoursesGroups ()
 Save settings of courses and groups overview. More...
 
 editViewFavourites ()
 Edit favourites view. More...
 
 saveViewFavourites ()
 Save settings of favourites overview. More...
 
 saveViewSettings (int $view, string $redirect_cmd)
 Save settings of favourites overview. More...
 
- 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...
 

Protected Attributes

 $rbacsystem
 
 $error
 
 $ui_factory
 
 $ui_renderer
 
 $viewSettings
 
 $request
 
 $ui
 
 $side_panel_settings
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Private Member Functions

 maybeDisable (array $fields)
 
 canWrite ()
 

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 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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Contructor.

public

Definition at line 62 of file class.ilObjDashboardSettingsGUI.php.

References $DIC, $GLOBALS, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), settings(), ui(), and user().

63  {
64  global $DIC;
65 
66  $this->lng = $DIC->language();
67  $this->rbacsystem = $DIC->rbac()->system();
68  $this->error = $DIC["ilErr"];
69  $this->access = $DIC->access();
70  $this->ctrl = $DIC->ctrl();
71  $this->settings = $DIC->settings();
72  $lng = $DIC->language();
73  $this->ui_factory = $DIC->ui()->factory();
74  $this->ui_renderer = $DIC->ui()->renderer();
75  $this->request = $DIC->http()->request();
76  $this->ui = $DIC->ui();
77 
78  $this->type = 'dshs';
79  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
80 
81  $lng->loadLanguageModule("dash");
82 
83  $this->viewSettings = new ilPDSelectedItemsBlockViewSettings($GLOBALS['DIC']->user());
84 
85  $this->side_panel_settings = new ilDashboardSidePanelSettingsRepository();
86  }
settings()
Definition: settings.php:2
user()
Definition: user.php:4
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
ui()
Definition: ui.php:5
__construct(Container $dic, ilPlugin $plugin)
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ canWrite()

ilObjDashboardSettingsGUI::canWrite ( )
private

Definition at line 448 of file class.ilObjDashboardSettingsGUI.php.

Referenced by maybeDisable(), saveSettings(), and saveViewSettings().

448  : bool
449  {
450  return $this->rbacsystem->checkAccess('write', $this->object->getRefId());
451  }
+ Here is the caller graph for this function:

◆ editSettings()

ilObjDashboardSettingsGUI::editSettings ( )

Edit personal desktop settings.

Definition at line 156 of file class.ilObjDashboardSettingsGUI.php.

References $ui, initForm(), and setSettingsSubTabs().

157  {
158  $this->setSettingsSubTabs("general");
159  $ui = $this->ui;
160  $form = $this->initForm();
161  $this->tpl->setContent($ui->renderer()->renderAsync($form));
162  }
+ Here is the call graph for this function:

◆ editViewCoursesGroups()

ilObjDashboardSettingsGUI::editViewCoursesGroups ( )
protected

Edit settings of courses and groups overview.

Definition at line 287 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$tabs_gui, ilObjectGUI\$tpl, $ui_renderer, getViewSettingsForm(), and setSettingsSubTabs().

288  {
289  $main_tpl = $this->tpl;
290  $tabs = $this->tabs_gui;
292 
293  $tabs->activateTab("settings");
294  $this->setSettingsSubTabs("view_courses_groups");
295 
296  $form = $this->getViewSettingsForm($this->viewSettings->getMembershipsView());
297 
298  $main_tpl->setContent($ui_renderer->render($form));
299  }
getViewSettingsForm(int $view)
Get view courses and groups settings form.
+ Here is the call graph for this function:

◆ editViewFavourites()

ilObjDashboardSettingsGUI::editViewFavourites ( )
protected

Edit favourites view.

Definition at line 374 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$tabs_gui, ilObjectGUI\$tpl, $ui_renderer, getViewSettingsForm(), and setSettingsSubTabs().

375  {
376  $main_tpl = $this->tpl;
377  $tabs = $this->tabs_gui;
379 
380  $tabs->activateTab("settings");
381  $this->setSettingsSubTabs("view_favourites");
382 
383  $view = $this->viewSettings->getSelectedItemsView();
384 
385  $form = $this->getViewSettingsForm($view);
386 
387  $main_tpl->setContent($ui_renderer->render($form));
388  }
getViewSettingsForm(int $view)
Get view courses and groups settings form.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjDashboardSettingsGUI::executeCommand ( )

Execute command.

public

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

References $ret, and ilObjectGUI\prepareOutput().

95  {
96  $next_class = $this->ctrl->getNextClass($this);
97  $cmd = $this->ctrl->getCmd();
98 
99  $this->prepareOutput();
100 
101  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
102  $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
103  }
104 
105  switch ($next_class) {
106  case 'ilpermissiongui':
107  $this->tabs_gui->setTabActive('perm_settings');
108  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
109  $perm_gui = new ilPermissionGUI($this);
110  $ret = $this->ctrl->forwardCommand($perm_gui);
111  break;
112 
113  default:
114  if (!$cmd || $cmd == 'view') {
115  $cmd = "editSettings";
116  }
117 
118  $this->$cmd();
119  break;
120  }
121  return true;
122  }
prepareOutput($a_show_subobjects=true)
prepare output
$ret
Definition: parser.php:6
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjDashboardSettingsGUI::getAdminTabs ( )

Get tabs.

public

Definition at line 130 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$access, and $rbacsystem.

131  {
133  $ilAccess = $this->access;
134 
135  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
136  $this->tabs_gui->addTarget(
137  "settings",
138  $this->ctrl->getLinkTarget($this, "editSettings"),
139  array("editSettings", "view")
140  );
141  }
142 
143  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
144  $this->tabs_gui->addTarget(
145  "perm_settings",
146  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
147  array(),
148  'ilpermissiongui'
149  );
150  }
151  }

◆ getViewSettingsForm()

ilObjDashboardSettingsGUI::getViewSettingsForm ( int  $view)
protected

Get view courses and groups settings form.

Returns

Definition at line 306 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $ui_factory, and maybeDisable().

Referenced by editViewCoursesGroups(), editViewFavourites(), and saveViewSettings().

307  {
308  $ctrl = $this->ctrl;
309  $lng = $this->lng;
311 
312  if ($view == $this->viewSettings->getSelectedItemsView()) {
313  $save_cmd = "saveViewFavourites";
314  } else {
315  $save_cmd = "saveViewCoursesGroups";
316  }
317 
318  // presentation
319  $ops = $this->viewSettings->getAvailablePresentationsByView($view);
320  $pres_options = array_column(array_map(function ($k, $v) use ($lng) {
321  return [$v, $lng->txt("dash_" . $v)];
322  }, array_keys($ops), $ops), 1, 0);
323  $avail_pres = $ui_factory->input()->field()->multiselect($lng->txt("dash_avail_presentation"), $pres_options)
324  ->withValue($this->viewSettings->getActivePresentationsByView($view));
325  $default_pres = $ui_factory->input()->field()->radio($lng->txt("dash_default_presentation"))
326  ->withOption('list', $lng->txt("dash_list"))
327  ->withOption('tile', $lng->txt("dash_tile"));
328  $default_pres = $default_pres->withValue((string) $this->viewSettings->getDefaultPresentationByView($view));
329  $sec_presentation = $ui_factory->input()->field()->section(
330  $this->maybeDisable(["avail_pres" => $avail_pres, "default_pres" => $default_pres]),
331  $lng->txt("dash_presentation")
332  );
333 
334  // sortation
335  $ops = $this->viewSettings->getAvailableSortOptionsByView($view);
336  $sortation_options = array_column(array_map(function ($k, $v) use ($lng) {
337  return [$v, $lng->txt("dash_sort_by_" . $v)];
338  }, array_keys($ops), $ops), 1, 0);
339  $avail_sort = $ui_factory->input()->field()->multiselect($lng->txt("dash_avail_sortation"), $sortation_options)
340  ->withValue($this->viewSettings->getActiveSortingsByView($view));
341  $default_sort = $ui_factory->input()->field()->radio($lng->txt("dash_default_sortation"));
342  foreach ($sortation_options as $k => $text) {
343  $default_sort = $default_sort->withOption($k, $text);
344  }
345  $default_sort = $default_sort->withValue((string) $this->viewSettings->getDefaultSortingByView($view));
346  $sec_sortation = $ui_factory->input()->field()->section(
347  $this->maybeDisable(["avail_sort" => $avail_sort, "default_sort" => $default_sort]),
348  $lng->txt("dash_sortation")
349  );
350 
351  $form = $ui_factory->input()->container()->form()->standard(
352  $ctrl->getFormAction($this, $save_cmd),
353  ["presentation" => $sec_presentation, "sortation" => $sec_sortation]
354  );
355 
356  return $form;
357  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initForm()

ilObjDashboardSettingsGUI::initForm ( )

Init form.

Returns

Definition at line 168 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$ctrl, Vendor\Package\$f, ilObjectGUI\$lng, $side_panel_settings, $ui, and maybeDisable().

Referenced by editSettings(), and saveSettings().

169  {
170  $ui = $this->ui;
171  $f = $ui->factory();
172  $ctrl = $this->ctrl;
173  $lng = $this->lng;
174 
175  $side_panel = $this->side_panel_settings;
176 
177  $fields["enable_favourites"] = $f->input()->field()->checkbox($lng->txt("dash_enable_favourites"))
178  ->withValue($this->viewSettings->enabledSelectedItems());
179  $info_text = ($this->viewSettings->enabledMemberships())
180  ? ""
181  : $lng->txt("dash_member_main_alt") . " " . $ui->renderer()->render(
182  $ui->factory()->link()->standard(
183  $lng->txt("dash_click_here"),
184  $ctrl->getLinkTargetByClass(["ilAdministrationGUI", "ilObjMainMenuGUI", "ilmmsubitemgui"])
185  )
186  );
187 
188  $fields["enable_memberships"] = $f->input()->field()->checkbox($lng->txt("dash_enable_memberships"), $info_text)
189  ->withValue($this->viewSettings->enabledMemberships());
190 
191  // main panel
192  $section1 = $f->input()->field()->section($this->maybeDisable($fields), $lng->txt("dash_main_panel"));
193 
194  $sp_fields = [];
195  foreach ($side_panel->getValidModules() as $mod) {
196  $sp_fields["enable_" . $mod] = $f->input()->field()->checkbox($lng->txt("dash_enable_" . $mod))
197  ->withValue($side_panel->isEnabled($mod));
198  }
199 
200  // side panel
201  $section2 = $f->input()->field()->section($this->maybeDisable($sp_fields), $lng->txt("dash_side_panel"));
202 
203  $form_action = $ctrl->getLinkTarget($this, "saveSettings");
204  return $f->input()->container()->form()->standard(
205  $form_action,
206  ["main_panel" => $section1, "side_panel" => $section2]
207  );
208  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maybeDisable()

ilObjDashboardSettingsGUI::maybeDisable ( array  $fields)
private
Parameters
FormInput[]$fields
Returns
FormInput[]

Definition at line 437 of file class.ilObjDashboardSettingsGUI.php.

References canWrite(), and ILIAS\UI\Component\Input\Field\Input\withDisabled().

Referenced by getViewSettingsForm(), and initForm().

437  : array
438  {
439  if ($this->canWrite()) {
440  return $fields;
441  }
442 
443  return array_map(static function (Input $field) : Input {
444  return $field->withDisabled(true);
445  }, $fields);
446  }
withDisabled($is_disabled)
Get an input like this, but set it to a disabled state.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjDashboardSettingsGUI::saveSettings ( )

Save personal desktop settings.

Definition at line 213 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilCtrl, $request, $side_panel_settings, canWrite(), initForm(), and ilUtil\sendFailure().

214  {
216  $ilAccess = $this->access;
217  $side_panel = $this->side_panel_settings;
218 
219  if (!$this->canWrite()) {
220  ilUtil::sendFailure($this->lng->txt('no_permission'), true);
221  $ilCtrl->redirect($this, "editSettings");
222  }
223 
225 
226  $form = $this->initForm();
227  $form = $form->withRequest($request);
228  $form_data = $form->getData();
229  $this->viewSettings->enableSelectedItems((int) ($form_data['main_panel']['enable_favourites'] != ""));
230  $this->viewSettings->enableMemberships((int) ($form_data['main_panel']['enable_memberships'] != ""));
231 
232  foreach ($side_panel->getValidModules() as $mod) {
233  $side_panel->enable($mod, (bool) $form_data['side_panel']['enable_' . $mod]);
234  }
235 
236 
237  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
238  $ilCtrl->redirect($this, "editSettings");
239  }
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ saveViewCoursesGroups()

ilObjDashboardSettingsGUI::saveViewCoursesGroups ( )
protected

Save settings of courses and groups overview.

Definition at line 363 of file class.ilObjDashboardSettingsGUI.php.

References saveViewSettings().

364  {
365  $this->saveViewSettings(
366  $this->viewSettings->getMembershipsView(),
367  "editViewCoursesGroups"
368  );
369  }
saveViewSettings(int $view, string $redirect_cmd)
Save settings of favourites overview.
+ Here is the call graph for this function:

◆ saveViewFavourites()

ilObjDashboardSettingsGUI::saveViewFavourites ( )
protected

Save settings of favourites overview.

Definition at line 393 of file class.ilObjDashboardSettingsGUI.php.

References saveViewSettings().

394  {
395  $this->saveViewSettings(
396  $this->viewSettings->getSelectedItemsView(),
397  "editViewFavourites"
398  );
399  }
saveViewSettings(int $view, string $redirect_cmd)
Save settings of favourites overview.
+ Here is the call graph for this function:

◆ saveViewSettings()

ilObjDashboardSettingsGUI::saveViewSettings ( int  $view,
string  $redirect_cmd 
)
protected

Save settings of favourites overview.

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $request, canWrite(), getViewSettingsForm(), and ilUtil\sendFailure().

Referenced by saveViewCoursesGroups(), and saveViewFavourites().

405  {
407  $lng = $this->lng;
408  $ctrl = $this->ctrl;
409 
410  if (!$this->canWrite()) {
411  ilUtil::sendFailure($this->lng->txt('no_permission'), true);
412  $ctrl->redirect($this, $redirect_cmd);
413  }
414 
415  $form = $this->getViewSettingsForm($view);
416  $form = $form->withRequest($request);
417  $form_data = $form->getData();
418  $this->viewSettings->storeViewSorting(
419  $view,
420  $form_data['sortation']['default_sort'],
421  $form_data['sortation']['avail_sort'] ?: []
422  );
423  $this->viewSettings->storeViewPresentation(
424  $view,
425  $form_data['presentation']['default_pres'],
426  $form_data['presentation']['avail_pres'] ?: []
427  );
428 
429  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
430  $ctrl->redirect($this, $redirect_cmd);
431  }
getViewSettingsForm(int $view)
Get view courses and groups settings form.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjDashboardSettingsGUI::setSettingsSubTabs (   $a_active)

Get tabs.

public

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $rbacsystem, and ilObjectGUI\$tabs_gui.

Referenced by editSettings(), editViewCoursesGroups(), and editViewFavourites().

249  {
251  $ilAccess = $this->access;
252 
253  $tabs = $this->tabs_gui;
254  $ctrl = $this->ctrl;
255  $lng = $this->lng;
256 
257  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
258  $tabs->addSubtab(
259  "general",
260  $lng->txt("general_settings"),
261  $ctrl->getLinkTarget($this, "editSettings")
262  );
263 
264  if ($this->viewSettings->enabledSelectedItems()) {
265  $tabs->addSubtab(
266  "view_favourites",
267  $lng->txt("dash_view_favourites"),
268  $ctrl->getLinkTarget($this, "editViewFavourites")
269  );
270  }
271 
272  if ($this->viewSettings->enabledMemberships()) {
273  $tabs->addSubtab(
274  "view_courses_groups",
275  $lng->txt("dash_view_courses_groups"),
276  $ctrl->getLinkTarget($this, "editViewCoursesGroups")
277  );
278  }
279  }
280 
281  $tabs->activateSubtab($a_active);
282  }
+ Here is the caller graph for this function:

Field Documentation

◆ $error

ilObjDashboardSettingsGUI::$error
protected

Definition at line 25 of file class.ilObjDashboardSettingsGUI.php.

◆ $rbacsystem

ilObjDashboardSettingsGUI::$rbacsystem
protected

Definition at line 20 of file class.ilObjDashboardSettingsGUI.php.

Referenced by getAdminTabs(), and setSettingsSubTabs().

◆ $request

ilObjDashboardSettingsGUI::$request
protected

Definition at line 45 of file class.ilObjDashboardSettingsGUI.php.

Referenced by saveSettings(), and saveViewSettings().

◆ $side_panel_settings

ilObjDashboardSettingsGUI::$side_panel_settings
protected

Definition at line 55 of file class.ilObjDashboardSettingsGUI.php.

Referenced by initForm(), and saveSettings().

◆ $ui

ilObjDashboardSettingsGUI::$ui
protected

Definition at line 50 of file class.ilObjDashboardSettingsGUI.php.

Referenced by editSettings(), and initForm().

◆ $ui_factory

ilObjDashboardSettingsGUI::$ui_factory
protected

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

Referenced by getViewSettingsForm().

◆ $ui_renderer

ilObjDashboardSettingsGUI::$ui_renderer
protected

◆ $viewSettings

ilObjDashboardSettingsGUI::$viewSettings
protected

Definition at line 40 of file class.ilObjDashboardSettingsGUI.php.


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