ILIAS  release_7 Revision v7.30-3-g800a261c036
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 ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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

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

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 78 of file class.ilObjDashboardSettingsGUI.php.

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

79  {
80  global $DIC;
81 
82  $this->lng = $DIC->language();
83  $this->rbacsystem = $DIC->rbac()->system();
84  $this->error = $DIC["ilErr"];
85  $this->access = $DIC->access();
86  $this->ctrl = $DIC->ctrl();
87  $this->settings = $DIC->settings();
88  $lng = $DIC->language();
89  $this->ui_factory = $DIC->ui()->factory();
90  $this->ui_renderer = $DIC->ui()->renderer();
91  $this->request = $DIC->http()->request();
92  $this->ui = $DIC->ui();
93 
94  $this->type = 'dshs';
95  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
96 
97  $lng->loadLanguageModule("dash");
98 
99  $this->viewSettings = new ilPDSelectedItemsBlockViewSettings($GLOBALS['DIC']->user());
100 
101  $this->side_panel_settings = new ilDashboardSidePanelSettingsRepository();
102  }
settings()
Definition: settings.php:2
user()
Definition: user.php:4
global $DIC
Definition: goto.php:24
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
ui()
Definition: ui.php:5
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ canWrite()

ilObjDashboardSettingsGUI::canWrite ( )
private

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

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

464  : bool
465  {
466  return $this->rbacsystem->checkAccess('write', $this->object->getRefId());
467  }
+ Here is the caller graph for this function:

◆ editSettings()

ilObjDashboardSettingsGUI::editSettings ( )

Edit personal desktop settings.

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

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

173  {
174  if ($this->settings->get('rep_favourites', '0') !== '1') {
175  $content[] = $this->ui->factory()->messageBox()->info($this->lng->txt('favourites_disabled_info'));
176  }
177 
178  if ($this->settings->get('mmbr_my_crs_grp', '0') !== '1') {
179  $content[] = $this->ui->factory()->messageBox()->info($this->lng->txt('memberships_disabled_info'));
180  }
181  $this->setSettingsSubTabs('general');
182  $content[] = $this->initForm();
183  $this->tpl->setContent($this->ui->renderer()->renderAsync($content));
184  }
settings()
Definition: settings.php:2
ui()
Definition: ui.php:5
+ Here is the call graph for this function:

◆ editViewCoursesGroups()

ilObjDashboardSettingsGUI::editViewCoursesGroups ( )
protected

Edit settings of courses and groups overview.

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

References getViewSettingsForm(), setSettingsSubTabs(), settings(), and ui().

310  {
311  if ($this->settings->get('mmbr_my_crs_grp', '0') !== '1') {
312  $content[] = $this->ui->factory()->messageBox()->info($this->lng->txt('memberships_disabled_info'));
313  }
314  $this->tabs_gui->activateTab("settings");
315  $this->setSettingsSubTabs("view_courses_groups");
316 
317  $content[] = $this->getViewSettingsForm($this->viewSettings->getMembershipsView());
318  $this->tpl->setContent($this->ui_renderer->render($content));
319  }
getViewSettingsForm(int $view)
Get view courses and groups settings form.
settings()
Definition: settings.php:2
ui()
Definition: ui.php:5
+ Here is the call graph for this function:

◆ editViewFavourites()

ilObjDashboardSettingsGUI::editViewFavourites ( )
protected

Edit favourites view.

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

References getViewSettingsForm(), setSettingsSubTabs(), settings(), and ui().

395  {
396  if ($this->settings->get('rep_favourites', "0") !== '1') {
397  $content[] = $this->ui->factory()->messageBox()->info($this->lng->txt('favourites_disabled_info'));
398  }
399  $this->tabs_gui->activateTab("settings");
400  $this->setSettingsSubTabs("view_favourites");
401 
402  $content[] = $this->getViewSettingsForm($this->viewSettings->getSelectedItemsView());
403  $this->tpl->setContent($this->ui_renderer->render($content));
404  }
getViewSettingsForm(int $view)
Get view courses and groups settings form.
settings()
Definition: settings.php:2
ui()
Definition: ui.php:5
+ Here is the call graph for this function:

◆ executeCommand()

ilObjDashboardSettingsGUI::executeCommand ( )

Execute command.

public

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

References $ret, and ilObjectGUI\prepareOutput().

111  {
112  $next_class = $this->ctrl->getNextClass($this);
113  $cmd = $this->ctrl->getCmd();
114 
115  $this->prepareOutput();
116 
117  if (!$this->rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
118  $this->error->raiseError($this->lng->txt('no_permission'), $this->error->WARNING);
119  }
120 
121  switch ($next_class) {
122  case 'ilpermissiongui':
123  $this->tabs_gui->setTabActive('perm_settings');
124  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
125  $perm_gui = new ilPermissionGUI($this);
126  $ret = $this->ctrl->forwardCommand($perm_gui);
127  break;
128 
129  default:
130  if (!$cmd || $cmd == 'view') {
131  $cmd = "editSettings";
132  }
133 
134  $this->$cmd();
135  break;
136  }
137  return true;
138  }
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 146 of file class.ilObjDashboardSettingsGUI.php.

References ilObjectGUI\$access, and $rbacsystem.

147  {
149  $ilAccess = $this->access;
150 
151  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
152  $this->tabs_gui->addTarget(
153  "settings",
154  $this->ctrl->getLinkTarget($this, "editSettings"),
155  array("editSettings", "view")
156  );
157  }
158 
159  if ($rbacsystem->checkAccess('edit_permission', $this->object->getRefId())) {
160  $this->tabs_gui->addTarget(
161  "perm_settings",
162  $this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"),
163  array(),
164  'ilpermissiongui'
165  );
166  }
167  }

◆ getViewSettingsForm()

ilObjDashboardSettingsGUI::getViewSettingsForm ( int  $view)
protected

Get view courses and groups settings form.

Returns

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

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

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

327  {
328  $ctrl = $this->ctrl;
329  $lng = $this->lng;
331 
332  if ($view == $this->viewSettings->getSelectedItemsView()) {
333  $save_cmd = "saveViewFavourites";
334  } else {
335  $save_cmd = "saveViewCoursesGroups";
336  }
337 
338  // presentation
339  $ops = $this->viewSettings->getAvailablePresentationsByView($view);
340  $pres_options = array_column(array_map(function ($k, $v) use ($lng) {
341  return [$v, $lng->txt("dash_" . $v)];
342  }, array_keys($ops), $ops), 1, 0);
343  $avail_pres = $ui_factory->input()->field()->multiselect($lng->txt("dash_avail_presentation"), $pres_options)
344  ->withValue($this->viewSettings->getActivePresentationsByView($view));
345  $default_pres = $ui_factory->input()->field()->radio($lng->txt("dash_default_presentation"))
346  ->withOption('list', $lng->txt("dash_list"))
347  ->withOption('tile', $lng->txt("dash_tile"));
348  $default_pres = $default_pres->withValue((string) $this->viewSettings->getDefaultPresentationByView($view));
349  $sec_presentation = $ui_factory->input()->field()->section(
350  $this->maybeDisable(["avail_pres" => $avail_pres, "default_pres" => $default_pres]),
351  $lng->txt("dash_presentation")
352  );
353 
354  // sortation
355  $ops = $this->viewSettings->getAvailableSortOptionsByView($view);
356  $sortation_options = array_column(array_map(function ($k, $v) use ($lng) {
357  return [$v, $lng->txt("dash_sort_by_" . $v)];
358  }, array_keys($ops), $ops), 1, 0);
359  $avail_sort = $ui_factory->input()->field()->multiselect($lng->txt("dash_avail_sortation"), $sortation_options)
360  ->withValue($this->viewSettings->getActiveSortingsByView($view));
361  $default_sort = $ui_factory->input()->field()->radio($lng->txt("dash_default_sortation"));
362  foreach ($sortation_options as $k => $text) {
363  $default_sort = $default_sort->withOption($k, $text);
364  }
365  $default_sort = $default_sort->withValue((string) $this->viewSettings->getDefaultSortingByView($view));
366  $sec_sortation = $ui_factory->input()->field()->section(
367  $this->maybeDisable(["avail_sort" => $avail_sort, "default_sort" => $default_sort]),
368  $lng->txt("dash_sortation")
369  );
370 
371  $form = $ui_factory->input()->container()->form()->standard(
372  $ctrl->getFormAction($this, $save_cmd),
373  ["presentation" => $sec_presentation, "sortation" => $sec_sortation]
374  );
375 
376  return $form;
377  }
+ 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 190 of file class.ilObjDashboardSettingsGUI.php.

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

Referenced by editSettings(), and saveSettings().

191  {
192  $ui = $this->ui;
193  $f = $ui->factory();
194  $ctrl = $this->ctrl;
195  $lng = $this->lng;
196 
197  $side_panel = $this->side_panel_settings;
198 
199  $fields["enable_favourites"] = $f->input()->field()->checkbox($lng->txt("dash_enable_favourites"))
200  ->withValue($this->viewSettings->enabledSelectedItems());
201  $info_text = ($this->viewSettings->enabledMemberships())
202  ? ""
203  : $lng->txt("dash_member_main_alt") . " " . $ui->renderer()->render(
204  $ui->factory()->link()->standard(
205  $lng->txt("dash_click_here"),
206  $ctrl->getLinkTargetByClass(["ilAdministrationGUI", "ilObjMainMenuGUI", "ilmmsubitemgui"])
207  )
208  );
209 
210  $fields["enable_memberships"] = $f->input()->field()->checkbox($lng->txt("dash_enable_memberships"), $info_text)
211  ->withValue($this->viewSettings->enabledMemberships());
212 
213  // main panel
214  $section1 = $f->input()->field()->section($this->maybeDisable($fields), $lng->txt("dash_main_panel"));
215 
216  $sp_fields = [];
217  foreach ($side_panel->getValidModules() as $mod) {
218  $sp_fields["enable_" . $mod] = $f->input()->field()->checkbox($lng->txt("dash_enable_" . $mod))
219  ->withValue($side_panel->isEnabled($mod));
220  }
221 
222  // side panel
223  $section2 = $f->input()->field()->section($this->maybeDisable($sp_fields), $lng->txt("dash_side_panel"));
224 
225  $form_action = $ctrl->getLinkTarget($this, "saveSettings");
226  return $f->input()->container()->form()->standard(
227  $form_action,
228  ["main_panel" => $section1, "side_panel" => $section2]
229  );
230  }
+ 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 453 of file class.ilObjDashboardSettingsGUI.php.

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

Referenced by getViewSettingsForm(), and initForm().

453  : array
454  {
455  if ($this->canWrite()) {
456  return $fields;
457  }
458 
459  return array_map(static function (FormInput $field) : FormInput {
460  return $field->withDisabled(true);
461  }, $fields);
462  }
withDisabled($is_disabled)
Get an input like this, but set it to a disabled state.
This describes inputs that can be used in forms.
Definition: FormInput.php:15
+ 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 235 of file class.ilObjDashboardSettingsGUI.php.

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

236  {
237  $ilCtrl = $this->ctrl;
238  $ilAccess = $this->access;
239  $side_panel = $this->side_panel_settings;
240 
241  if (!$this->canWrite()) {
242  ilUtil::sendFailure($this->lng->txt('no_permission'), true);
243  $ilCtrl->redirect($this, "editSettings");
244  }
245 
247 
248  $form = $this->initForm();
249  $form = $form->withRequest($request);
250  $form_data = $form->getData();
251  $this->viewSettings->enableSelectedItems($form_data['main_panel']['enable_favourites']);
252  $this->viewSettings->enableMemberships($form_data['main_panel']['enable_memberships']);
253 
254  foreach ($side_panel->getValidModules() as $mod) {
255  $side_panel->enable($mod, (bool) $form_data['side_panel']['enable_' . $mod]);
256  }
257 
258 
259  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
260  $ilCtrl->redirect($this, "editSettings");
261  }
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 383 of file class.ilObjDashboardSettingsGUI.php.

References saveViewSettings().

384  {
385  $this->saveViewSettings(
386  $this->viewSettings->getMembershipsView(),
387  "editViewCoursesGroups"
388  );
389  }
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 409 of file class.ilObjDashboardSettingsGUI.php.

References saveViewSettings().

410  {
411  $this->saveViewSettings(
412  $this->viewSettings->getSelectedItemsView(),
413  "editViewFavourites"
414  );
415  }
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 420 of file class.ilObjDashboardSettingsGUI.php.

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

Referenced by saveViewCoursesGroups(), and saveViewFavourites().

421  {
423  $lng = $this->lng;
424  $ctrl = $this->ctrl;
425 
426  if (!$this->canWrite()) {
427  ilUtil::sendFailure($this->lng->txt('no_permission'), true);
428  $ctrl->redirect($this, $redirect_cmd);
429  }
430 
431  $form = $this->getViewSettingsForm($view);
432  $form = $form->withRequest($request);
433  $form_data = $form->getData();
434  $this->viewSettings->storeViewSorting(
435  $view,
436  $form_data['sortation']['default_sort'],
437  $form_data['sortation']['avail_sort'] ?: []
438  );
439  $this->viewSettings->storeViewPresentation(
440  $view,
441  $form_data['presentation']['default_pres'],
442  $form_data['presentation']['avail_pres'] ?: []
443  );
444 
445  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
446  $ctrl->redirect($this, $redirect_cmd);
447  }
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 270 of file class.ilObjDashboardSettingsGUI.php.

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

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

271  {
273  $ilAccess = $this->access;
274 
276  $ctrl = $this->ctrl;
277  $lng = $this->lng;
278 
279  if ($rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
280  $tabs->addSubtab(
281  "general",
282  $lng->txt("general_settings"),
283  $ctrl->getLinkTarget($this, "editSettings")
284  );
285 
286  if ($this->viewSettings->enabledSelectedItems()) {
287  $tabs->addSubtab(
288  "view_favourites",
289  $lng->txt("dash_view_favourites"),
290  $ctrl->getLinkTarget($this, "editViewFavourites")
291  );
292  }
293 
294  if ($this->viewSettings->enabledMemberships()) {
295  $tabs->addSubtab(
296  "view_courses_groups",
297  $lng->txt("dash_view_courses_groups"),
298  $ctrl->getLinkTarget($this, "editViewCoursesGroups")
299  );
300  }
301  }
302 
303  $tabs->activateSubtab($a_active);
304  }
+ Here is the caller graph for this function:

Field Documentation

◆ $error

ilObjDashboardSettingsGUI::$error
protected

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

◆ $rbacsystem

ilObjDashboardSettingsGUI::$rbacsystem
protected

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

Referenced by getAdminTabs(), and setSettingsSubTabs().

◆ $request

ilObjDashboardSettingsGUI::$request
protected

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

Referenced by saveSettings(), and saveViewSettings().

◆ $side_panel_settings

ilObjDashboardSettingsGUI::$side_panel_settings
protected

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

Referenced by initForm(), and saveSettings().

◆ $ui

ilObjDashboardSettingsGUI::$ui
protected

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

Referenced by initForm().

◆ $ui_factory

ilObjDashboardSettingsGUI::$ui_factory
protected

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

Referenced by getViewSettingsForm().

◆ $ui_renderer

ilObjDashboardSettingsGUI::$ui_renderer
protected

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

◆ $viewSettings

ilObjDashboardSettingsGUI::$viewSettings
protected

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


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