19declare(strict_types=1);
38 $this->navigation_history =
$DIC[
'ilNavigationHistory'] ??
null;
43 return 'last_visited';
58 return AvailablePages::MainSettings;
67 FieldFactory $field_factory,
73 return $field_factory->select(
74 $lng->txt(
'user_store_last_visited'),
76 0 =>
$lng->txt(
'user_lv_keep_entries'),
77 1 =>
$lng->txt(
'user_lv_keep_only_for_session'),
78 2 =>
$lng->txt(
'user_lv_do_not_store')
95 0 =>
$lng->txt(
'user_lv_keep_entries'),
96 1 =>
$lng->txt(
'user_lv_keep_only_for_session'),
97 2 =>
$lng->txt(
'user_lv_do_not_store')
102 ? $this->retrieveValueFromUser($user)
119 return $this->retrieveValueFromUser($user) !== 0;
126 $user->setPref(
'store_last_visited', $input ??
'0');
127 if ((
int) $input > 0) {
128 $this->navigation_history->deleteDBEntries();
129 if ($input ===
'2') {
130 $this->navigation_history->deleteSessionEntries();
138 return (
int) ($user->
getPref(
'store_last_visited') ?? 0);
persistUserInput(\ilObjUser $user, mixed $input)
hasUserPersonalizedSetting(\ilSetting $settings, \ilObjUser $user)
getLegacyInput(Language $lng, \ilSetting $settings, ?\ilObjUser $user=null)
You don't need to add a post_var to the input as the User will handle this for you,...
getDefaultValueForDisplay(Language $lng, \ilSetting $settings)
retrieveValueFromUser(\ilObjUser $user)
isAvailable()
If this function returns false the setting will not be shown, even if it's PropertyAttributes would a...
getInput(FieldFactory $field_factory, Language $lng, Refinery $refinery, \ilSetting $settings, ?\ilObjUser $user=null)
readonly ilNavigationHistory $navigation_history
Last visited history for repository items.
getPref(string $a_keyword)
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...