ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjDashboardSettingsGUI Class Reference

ilObjDashboardSettingsGUI: ilPermissionGUI ilObjDashboardSettingsGUI: ilAdministrationGUI More...

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

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference=true, bool $a_prepare_output=true)
 
 executeCommand ()
 
 getAdminTabs ()
 
 editSettings ()
 
 initForm ()
 
 saveSettings ()
 
 setSettingsSubTabs (string $a_active)
 
- 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

 editViewCoursesGroups ()
 
 getViewSettingsForm (int $view)
 
 saveViewCoursesGroups ()
 
 editViewFavourites ()
 
 saveViewFavourites ()
 
 saveViewSettings (int $view, string $redirect_cmd)
 
- 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 ()
 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

Factory $ui_factory
 
Renderer $ui_renderer
 
ilPDSelectedItemsBlockViewSettings $viewSettings
 
UIServices $ui
 
ilDashboardSidePanelSettingsRepository $side_panel_settings
 
- 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 = ""
 

Private Member Functions

 maybeDisable (array $fields)
 
 canWrite ()
 

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

Constructor & Destructor Documentation

◆ __construct()

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

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

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\settings(), and ILIAS\Repository\ui().

44  {
45  global $DIC;
46 
47  $this->lng = $DIC->language();
48  $this->rbac_system = $DIC->rbac()->system();
49  $this->access = $DIC->access();
50  $this->ctrl = $DIC->ctrl();
51  $this->settings = $DIC->settings();
52  $lng = $DIC->language();
53  $this->ui_factory = $DIC->ui()->factory();
54  $this->ui_renderer = $DIC->ui()->renderer();
55  $this->request = $DIC->http()->request();
56  $this->ui = $DIC->ui();
57 
58  $this->type = 'dshs';
59  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
60 
61  $lng->loadLanguageModule('dash');
62 
63  $this->viewSettings = new ilPDSelectedItemsBlockViewSettings($DIC->user());
64 
65  $this->side_panel_settings = new ilDashboardSidePanelSettingsRepository();
66  }
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ canWrite()

ilObjDashboardSettingsGUI::canWrite ( )
private

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

References ILIAS\Repository\object().

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

360  : bool
361  {
362  return $this->rbac_system->checkAccess('write', $this->object->getRefId());
363  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editSettings()

ilObjDashboardSettingsGUI::editSettings ( )

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

References initForm(), ILIAS\Repository\lng(), setSettingsSubTabs(), ILIAS\Repository\settings(), and ILIAS\Repository\ui().

115  : void
116  {
117  if ($this->settings->get('rep_favourites', '0') !== '1') {
118  $content[] = $this->ui_factory->messageBox()->info($this->lng->txt('favourites_disabled_info'));
119  }
120 
121  if ($this->settings->get('mmbr_my_crs_grp', '0') !== '1') {
122  $content[] = $this->ui_factory->messageBox()->info($this->lng->txt('memberships_disabled_info'));
123  }
124  $this->setSettingsSubTabs('general');
125  $content[] = $this->initForm();
126  $this->tpl->setContent($this->ui->renderer()->renderAsync($content));
127  }
+ Here is the call graph for this function:

◆ editViewCoursesGroups()

ilObjDashboardSettingsGUI::editViewCoursesGroups ( )
protected

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

References getViewSettingsForm(), ILIAS\Repository\lng(), setSettingsSubTabs(), and ILIAS\Repository\settings().

227  : void
228  {
229  if ($this->settings->get('mmbr_my_crs_grp', '0') !== '1') {
230  $content[] = $this->ui_factory->messageBox()->info($this->lng->txt('memberships_disabled_info'));
231  }
232  $this->tabs_gui->activateTab('settings');
233  $this->setSettingsSubTabs('view_courses_groups');
234 
235  $content[] = $this->getViewSettingsForm($this->viewSettings->getMembershipsView());
236  $this->tpl->setContent($this->ui_renderer->render($content));
237  }
+ Here is the call graph for this function:

◆ editViewFavourites()

ilObjDashboardSettingsGUI::editViewFavourites ( )
protected

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

References getViewSettingsForm(), ILIAS\Repository\lng(), setSettingsSubTabs(), and ILIAS\Repository\settings().

294  : void
295  {
296  if ($this->settings->get('rep_favourites', '0') !== '1') {
297  $content[] = $this->ui_factory->messageBox()->info($this->lng->txt('favourites_disabled_info'));
298  }
299  $this->tabs_gui->activateTab('settings');
300  $this->setSettingsSubTabs('view_favourites');
301 
302  $content[] = $this->getViewSettingsForm($this->viewSettings->getSelectedItemsView());
303  $this->tpl->setContent($this->ui_renderer->render($content));
304  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjDashboardSettingsGUI::executeCommand ( )

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

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

68  : void
69  {
70  $cmd = $this->ctrl->getCmd();
71 
72  $this->prepareOutput();
73 
74  if (!$this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
75  throw new ilPermissionException($this->lng->txt('no_permission'));
76  }
77 
78  switch ($this->ctrl->getNextClass($this)) {
79  case 'ilpermissiongui':
80  $this->tabs_gui->setTabActive('perm_settings');
81  $perm_gui = new ilPermissionGUI($this);
82  $this->ctrl->forwardCommand($perm_gui);
83  break;
84 
85  default:
86  if (!$cmd || $cmd === 'view') {
87  $cmd = 'editSettings';
88  }
89 
90  $this->$cmd();
91  break;
92  }
93  }
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getAdminTabs()

ilObjDashboardSettingsGUI::getAdminTabs ( )

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

References ILIAS\Repository\ctrl().

95  : void
96  {
97  if ($this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
98  $this->tabs_gui->addTarget(
99  'settings',
100  $this->ctrl->getLinkTarget($this, 'editSettings'),
101  array('editSettings', 'view')
102  );
103  }
104 
105  if ($this->rbac_system->checkAccess('edit_permission', $this->object->getRefId())) {
106  $this->tabs_gui->addTarget(
107  'perm_settings',
108  $this->ctrl->getLinkTargetByClass('ilpermissiongui', 'perm'),
109  array(),
110  'ilpermissiongui'
111  );
112  }
113  }
+ Here is the call graph for this function:

◆ getViewSettingsForm()

ilObjDashboardSettingsGUI::getViewSettingsForm ( int  $view)
protected

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

References ilObjectGUI\$lng, $ui_factory, ILIAS\Repository\ctrl(), maybeDisable(), ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

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

239  : Standard
240  {
241  $lng = $this->lng;
243 
244  if ($view === $this->viewSettings->getSelectedItemsView()) {
245  $save_cmd = 'saveViewFavourites';
246  } else {
247  $save_cmd = 'saveViewCoursesGroups';
248  }
249 
250  $ops = $this->viewSettings->getAvailablePresentationsByView($view);
251  $pres_options = array_column(array_map(static fn ($v) => [$v, $lng->txt('dash_' . $v)], $ops), 1, 0);
252  $avail_pres = $this->ui_factory->input()->field()->multiSelect($lng->txt('dash_avail_presentation'), $pres_options)
253  ->withValue($this->viewSettings->getActivePresentationsByView($view));
254  $default_pres = $this->ui_factory->input()->field()->radio($lng->txt('dash_default_presentation'))
255  ->withOption('list', $lng->txt('dash_list'))
256  ->withOption('tile', $lng->txt('dash_tile'));
257  $default_pres = $default_pres->withValue($this->viewSettings->getDefaultPresentationByView($view));
258  $sec_presentation = $this->ui_factory->input()->field()->section(
259  $this->maybeDisable(['avail_pres' => $avail_pres, 'default_pres' => $default_pres]),
260  $lng->txt('dash_presentation')
261  );
262 
263  $ops = $this->viewSettings->getAvailableSortOptionsByView($view);
264  $sortation_options = array_column(array_map(static fn ($v) => [$v, $lng->txt('dash_sort_by_' . $v)], $ops), 1, 0);
265  $avail_sort = $this->ui_factory->input()->field()->multiSelect($lng->txt('dash_avail_sortation'), $sortation_options)
266  ->withValue($this->viewSettings->getActiveSortingsByView($view));
267  $default_sort = $this->ui_factory->input()->field()->radio($lng->txt('dash_default_sortation'));
268  foreach ($sortation_options as $k => $text) {
269  $default_sort = $default_sort->withOption($k, $text);
270  }
271  $default_sort = $default_sort->withValue($this->viewSettings->getDefaultSortingByView($view));
272  $sec_sortation = $this->ui_factory->input()->field()->section(
273  $this->maybeDisable(['avail_sort' => $avail_sort, 'default_sort' => $default_sort]),
274  $lng->txt('dash_sortation')
275  );
276 
277  $form = $this->ui_factory->input()->container()->form()->standard(
278  $this->ctrl->getFormAction($this, $save_cmd),
279  ['presentation' => $sec_presentation, 'sortation' => $sec_sortation]
280  );
281 
282  return $form;
283  }
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...
ilLanguage $lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:59
This describes a standard form.
Definition: Standard.php:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initForm()

ilObjDashboardSettingsGUI::initForm ( )

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

References ilObjectGUI\$form_action, ilObjectGUI\$lng, ILIAS\Repository\ctrl(), maybeDisable(), ilLanguage\txt(), ILIAS\Repository\ui(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by editSettings(), and saveSettings().

129  : Standard
130  {
131  $lng = $this->lng;
132 
133  $fields['enable_favourites'] = $this->ui_factory->input()->field()->checkbox($lng->txt('dash_enable_favourites'))
134  ->withValue($this->viewSettings->enabledSelectedItems());
135  $info_text = ($this->viewSettings->enabledMemberships())
136  ? ''
137  : $lng->txt('dash_member_main_alt') . ' ' . $this->ui->renderer()->render(
138  $this->ui_factory->link()->standard(
139  $lng->txt('dash_click_here'),
140  $this->ctrl->getLinkTargetByClass(['ilAdministrationGUI', 'ilObjMainMenuGUI', 'ilmmsubitemgui'])
141  )
142  );
143 
144  $fields['enable_memberships'] = $this->ui_factory->input()->field()->checkbox($lng->txt('dash_enable_memberships'), $info_text)
145  ->withValue($this->viewSettings->enabledMemberships());
146 
147  $section1 = $this->ui_factory->input()->field()->section($this->maybeDisable($fields), $lng->txt('dash_main_panel'));
148 
149  $sp_fields = [];
150  foreach ($this->side_panel_settings->getValidModules() as $mod) {
151  $sp_fields['enable_' . $mod] = $this->ui_factory->input()->field()->checkbox($lng->txt('dash_enable_' . $mod))
152  ->withValue($this->side_panel_settings->isEnabled($mod));
153  }
154 
155  $section2 = $this->ui_factory->input()->field()->section($this->maybeDisable($sp_fields), $lng->txt('dash_side_panel'));
156 
157  $form_action = $this->ctrl->getLinkTarget($this, 'saveSettings');
158  return $this->ui_factory->input()->container()->form()->standard(
159  $form_action,
160  ['main_panel' => $section1, 'side_panel' => $section2]
161  );
162  }
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...
ilLanguage $lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:59
This describes a standard form.
Definition: Standard.php:26
+ 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 351 of file class.ilObjDashboardSettingsGUI.php.

References canWrite().

Referenced by getViewSettingsForm(), and initForm().

351  : array
352  {
353  if ($this->canWrite()) {
354  return $fields;
355  }
356 
357  return array_map(static fn (FormInput $field): FormInput => $field->withDisabled(true), $fields);
358  }
This is a legacy support of Component that has been moved to Component.
Definition: FormInput.php:31
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveSettings()

ilObjDashboardSettingsGUI::saveSettings ( )

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

References canWrite(), ILIAS\Repository\ctrl(), initForm(), and ILIAS\Repository\lng().

164  : void
165  {
166  if ($this->canWrite()) {
167  $form = $this->initForm();
168  $form = $form->withRequest($this->request);
169  $form_data = $form->getData();
170  $this->viewSettings->enableSelectedItems($form_data['main_panel']['enable_favourites']);
171  $this->viewSettings->enableMemberships($form_data['main_panel']['enable_memberships']);
172 
173  foreach ($this->side_panel_settings->getValidModules() as $mod) {
174  $this->side_panel_settings->enable($mod, (bool) $form_data['side_panel']['enable_' . $mod]);
175  }
176 
177  $this->tpl->setOnScreenMessage(
178  $this->tpl::MESSAGE_TYPE_SUCCESS,
179  $this->lng->txt('settings_saved'),
180  true
181  );
182  } else {
183  $this->tpl->setOnScreenMessage(
184  $this->tpl::MESSAGE_TYPE_FAILURE,
185  $this->lng->txt('no_permission'),
186  true
187  );
188  }
189 
190  $this->ctrl->redirect($this, 'editSettings');
191  }
+ Here is the call graph for this function:

◆ saveViewCoursesGroups()

ilObjDashboardSettingsGUI::saveViewCoursesGroups ( )
protected

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

References saveViewSettings().

286  : void
287  {
288  $this->saveViewSettings(
289  $this->viewSettings->getMembershipsView(),
290  'editViewCoursesGroups'
291  );
292  }
saveViewSettings(int $view, string $redirect_cmd)
+ Here is the call graph for this function:

◆ saveViewFavourites()

ilObjDashboardSettingsGUI::saveViewFavourites ( )
protected

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

References saveViewSettings().

306  : void
307  {
308  $this->saveViewSettings(
309  $this->viewSettings->getSelectedItemsView(),
310  'editViewFavourites'
311  );
312  }
saveViewSettings(int $view, string $redirect_cmd)
+ Here is the call graph for this function:

◆ saveViewSettings()

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

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$request, canWrite(), getViewSettingsForm(), ILIAS\Repository\lng(), ilCtrl\redirect(), and ilLanguage\txt().

Referenced by saveViewCoursesGroups(), and saveViewFavourites().

314  : void
315  {
317  $lng = $this->lng;
318  $ctrl = $this->ctrl;
319 
320  if (!$this->canWrite()) {
321  $this->tpl->setOnScreenMessage(
322  $this->tpl::MESSAGE_TYPE_FAILURE,
323  $this->lng->txt('no_permission'),
324  true
325  );
326  $ctrl->redirect($this, $redirect_cmd);
327  }
328 
329  $form = $this->getViewSettingsForm($view);
330  $form = $form->withRequest($request);
331  $form_data = $form->getData();
332  $this->viewSettings->storeViewSorting(
333  $view,
334  $form_data['sortation']['default_sort'],
335  $form_data['sortation']['avail_sort'] ?: []
336  );
337  $this->viewSettings->storeViewPresentation(
338  $view,
339  $form_data['presentation']['default_pres'],
340  $form_data['presentation']['avail_pres'] ?: []
341  );
342 
343  $this->tpl->setOnScreenMessage('success', $lng->txt('msg_obj_modified'), true);
344  $ctrl->redirect($this, $redirect_cmd);
345  }
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...
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
ilLanguage $lng
ServerRequestInterface $request
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjDashboardSettingsGUI::setSettingsSubTabs ( string  $a_active)

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tabs_gui, ilCtrl\getLinkTarget(), and ilLanguage\txt().

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

194  : void
195  {
196  $tabs = $this->tabs_gui;
197  $ctrl = $this->ctrl;
198  $lng = $this->lng;
199 
200  if ($this->rbac_system->checkAccess('visible,read', $this->object->getRefId())) {
201  $tabs->addSubTab(
202  'general',
203  $lng->txt('general_settings'),
204  $ctrl->getLinkTarget($this, 'editSettings')
205  );
206 
207  if ($this->viewSettings->enabledSelectedItems()) {
208  $tabs->addSubTab(
209  'view_favourites',
210  $lng->txt('dash_view_favourites'),
211  $ctrl->getLinkTarget($this, 'editViewFavourites')
212  );
213  }
214 
215  if ($this->viewSettings->enabledMemberships()) {
216  $tabs->addSubTab(
217  'view_courses_groups',
218  $lng->txt('dash_view_courses_groups'),
219  $ctrl->getLinkTarget($this, 'editViewCoursesGroups')
220  );
221  }
222  }
223 
224  $tabs->activateSubTab($a_active);
225  }
ilTabsGUI $tabs_gui
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...
ilLanguage $lng
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $side_panel_settings

ilDashboardSidePanelSettingsRepository ilObjDashboardSettingsGUI::$side_panel_settings
protected

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

◆ $ui

UIServices ilObjDashboardSettingsGUI::$ui
protected

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

◆ $ui_factory

Factory ilObjDashboardSettingsGUI::$ui_factory
protected

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

Referenced by getViewSettingsForm().

◆ $ui_renderer

Renderer ilObjDashboardSettingsGUI::$ui_renderer
protected

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

◆ $viewSettings

ilPDSelectedItemsBlockViewSettings ilObjDashboardSettingsGUI::$viewSettings
protected

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


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