ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPDSelectedItemsBlockViewSettings Class Reference
+ Inheritance diagram for ilPDSelectedItemsBlockViewSettings:
+ Collaboration diagram for ilPDSelectedItemsBlockViewSettings:

Public Member Functions

 __construct (ilObjUser $actor, int $view=self::VIEW_SELECTED_ITEMS, Setting $settings=null, DashboardAccess $access=null)
 
 getMembershipsView ()
 
 getSelectedItemsView ()
 
 getStudyProgrammeView ()
 
 getListPresentationMode ()
 
 getTilePresentationMode ()
 
 isMembershipsViewActive ()
 
 isSelectedItemsViewActive ()
 
 isStudyProgrammeViewActive ()
 
 getSortByStartDateMode ()
 
 getSortByLocationMode ()
 
 getSortByTypeMode ()
 
 getSortByAlphabetMode ()
 
 getAvailableSortOptionsByView (int $view)
 
 getAvailablePresentationsByView (int $view)
 
 getDefaultSortingByView (int $view)
 
 isSortedByType ()
 
 isSortedByAlphabet ()
 
 isSortedByLocation ()
 
 isSortedByStartDate ()
 
 isTilePresentation ()
 
 isListPresentation ()
 
 storeViewSorting (int $view, string $type, array $active)
 
 getActiveSortingsByView (int $view)
 
 storeViewPresentation (int $view, string $default, array $active)
 
 getDefaultPresentationByView (int $view)
 
 getActivePresentationsByView (int $view)
 
 enabledMemberships ()
 
 enabledSelectedItems ()
 
 enableMemberships (bool $status)
 
 enableSelectedItems (bool $status)
 
 allViewsEnabled ()
 
 getDefaultView ()
 
 storeDefaultView (int $view)
 
 parse ()
 
 getEffectivePresentationMode ()
 
 getEffectiveSortingMode ()
 
 getSelectableSortingModes ()
 
 getSelectablePresentationModes ()
 
 storeActorPresentationMode (string $presentationMode)
 
 storeActorSortingMode (string $sortingMode)
 
 getActor ()
 
 getCurrentView ()
 
 getCurrentSortOption ()
 
 isValidView (int $view)
 

Protected Member Functions

 allViewsDisabled ()
 

Protected Attributes

Setting $settings
 
ilObjUser $actor
 
array $validViews = []
 
int $currentView = self::VIEW_SELECTED_ITEMS
 
string $currentSortOption = self::SORT_BY_LOCATION
 
string $currentPresentationOption = self::PRESENTATION_LIST
 
DashboardAccess $access
 

Static Protected Attributes

static array $availableViews
 
static array $availableSortOptions
 
static array $availablePresentations
 
static array $availableSortOptionsByView
 
static array $availablePresentationsByView
 

Additional Inherited Members

- Data Fields inherited from ilPDSelectedItemsBlockConstants
const VIEW_SELECTED_ITEMS = 0
 
const VIEW_MY_MEMBERSHIPS = 1
 
const VIEW_MY_STUDYPROGRAMME = 2
 
const SORT_BY_TYPE = 'type'
 
const SORT_BY_LOCATION = 'location'
 
const SORT_BY_START_DATE = 'start_date'
 
const SORT_BY_ALPHABET = 'alphabet'
 
const PRESENTATION_LIST = "list"
 
const PRESENTATION_TILE = "tile"
 

Detailed Description

Definition at line 24 of file class.ilPDSelectedItemsBlockViewSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilPDSelectedItemsBlockViewSettings::__construct ( ilObjUser  $actor,
int  $view = self::VIEW_SELECTED_ITEMS,
Setting  $settings = null,
DashboardAccess  $access = null 
)

Definition at line 78 of file class.ilPDSelectedItemsBlockViewSettings.php.

References $actor, $DIC, ILIAS\Repository\access(), and ILIAS\Repository\settings().

83  {
84  global $DIC;
85 
86  $this->settings = $settings ?? $DIC->settings();
87 
88  $this->actor = $actor;
89  $this->currentView = $view;
90  $this->access = $access ?? new DashboardAccess();
91  }
global $DIC
Definition: feed.php:28
+ Here is the call graph for this function:

Member Function Documentation

◆ allViewsDisabled()

ilPDSelectedItemsBlockViewSettings::allViewsDisabled ( )
protected

Definition at line 276 of file class.ilPDSelectedItemsBlockViewSettings.php.

References enabledMemberships(), and enabledSelectedItems().

+ Here is the call graph for this function:

◆ allViewsEnabled()

ilPDSelectedItemsBlockViewSettings::allViewsEnabled ( )

Definition at line 271 of file class.ilPDSelectedItemsBlockViewSettings.php.

References enabledMemberships(), and enabledSelectedItems().

+ Here is the call graph for this function:

◆ enabledMemberships()

ilPDSelectedItemsBlockViewSettings::enabledMemberships ( )

Definition at line 251 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

Referenced by allViewsDisabled(), and allViewsEnabled().

251  : bool
252  {
253  return $this->settings->get('disable_my_memberships', '0') === '0';
254  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enabledSelectedItems()

ilPDSelectedItemsBlockViewSettings::enabledSelectedItems ( )

Definition at line 256 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

Referenced by allViewsDisabled(), and allViewsEnabled().

256  : bool
257  {
258  return $this->settings->get('disable_my_offers', '0') === '0';
259  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableMemberships()

ilPDSelectedItemsBlockViewSettings::enableMemberships ( bool  $status)

Definition at line 261 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

261  : void
262  {
263  $this->settings->set('disable_my_memberships', $status ? '0' : '1');
264  }
+ Here is the call graph for this function:

◆ enableSelectedItems()

ilPDSelectedItemsBlockViewSettings::enableSelectedItems ( bool  $status)

Definition at line 266 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

266  : void
267  {
268  $this->settings->set('disable_my_offers', $status ? '0' : '1');
269  }
+ Here is the call graph for this function:

◆ getActivePresentationsByView()

ilPDSelectedItemsBlockViewSettings::getActivePresentationsByView ( int  $view)

Definition at line 245 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

Referenced by getSelectablePresentationModes().

245  : array
246  {
247  $val = $this->settings->get('pd_active_pres_view_' . $view, '');
248  return ($val === '') ? [] : unserialize($val);
249  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActiveSortingsByView()

ilPDSelectedItemsBlockViewSettings::getActiveSortingsByView ( int  $view)

Definition at line 225 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

Referenced by getSelectableSortingModes().

225  : array
226  {
227  $val = $this->settings->get('pd_active_sort_view_' . $view, '');
228  return ($val === '') ? [] : unserialize($val);
229  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getActor()

ilPDSelectedItemsBlockViewSettings::getActor ( )

Definition at line 366 of file class.ilPDSelectedItemsBlockViewSettings.php.

References $actor.

Referenced by ilPDSelectedItemsBlockViewGUI\bySettings().

+ Here is the caller graph for this function:

◆ getAvailablePresentationsByView()

ilPDSelectedItemsBlockViewSettings::getAvailablePresentationsByView ( int  $view)

Definition at line 158 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by getSelectablePresentationModes().

158  : array
159  {
160  return self::$availablePresentationsByView[$view];
161  }
+ Here is the caller graph for this function:

◆ getAvailableSortOptionsByView()

ilPDSelectedItemsBlockViewSettings::getAvailableSortOptionsByView ( int  $view)

Definition at line 153 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by getSelectableSortingModes(), and storeViewSorting().

153  : array
154  {
155  return self::$availableSortOptionsByView[$view];
156  }
+ Here is the caller graph for this function:

◆ getCurrentSortOption()

ilPDSelectedItemsBlockViewSettings::getCurrentSortOption ( )

Definition at line 376 of file class.ilPDSelectedItemsBlockViewSettings.php.

References $currentSortOption.

376  : string
377  {
379  }

◆ getCurrentView()

ilPDSelectedItemsBlockViewSettings::getCurrentView ( )

Definition at line 371 of file class.ilPDSelectedItemsBlockViewSettings.php.

References $currentView.

◆ getDefaultPresentationByView()

ilPDSelectedItemsBlockViewSettings::getDefaultPresentationByView ( int  $view)

Definition at line 240 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

Referenced by getEffectivePresentationMode().

240  : string
241  {
242  return $this->settings->get('pd_def_pres_view_' . $view, 'list');
243  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultSortingByView()

ilPDSelectedItemsBlockViewSettings::getDefaultSortingByView ( int  $view)

Definition at line 163 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSelectedItemsView(), getSortByLocationMode(), and ILIAS\Repository\settings().

Referenced by getEffectiveSortingMode(), and getSelectablePresentationModes().

163  : string
164  {
165  switch ($view) {
166  case $this->getSelectedItemsView():
167  return $this->settings->get('selected_items_def_sort', $this->getSortByLocationMode());
168 
169  default:
170  return $this->settings->get('my_memberships_def_sort', $this->getSortByLocationMode());
171  }
172  }
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
get(string $key, Refinery\Transformation $t)
Get passed parameter, if not data passed, get key from http request.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultView()

ilPDSelectedItemsBlockViewSettings::getDefaultView ( )

Definition at line 281 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSelectedItemsView(), and ILIAS\Repository\settings().

281  : int
282  {
283  return (int) ($this->settings->get('personal_items_default_view') ?? $this->getSelectedItemsView());
284  }
+ Here is the call graph for this function:

◆ getEffectivePresentationMode()

ilPDSelectedItemsBlockViewSettings::getEffectivePresentationMode ( )

Definition at line 299 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getDefaultPresentationByView(), and getSelectablePresentationModes().

Referenced by parse().

299  : string
300  {
301  $mode = $this->actor->getPref('pd_view_pres_' . $this->currentView);
302 
303  if (!in_array($mode, $this->getSelectablePresentationModes(), true)) {
304  $mode = $this->getDefaultPresentationByView($this->currentView);
305  }
306 
307  return $mode;
308  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getEffectiveSortingMode()

ilPDSelectedItemsBlockViewSettings::getEffectiveSortingMode ( )

Definition at line 310 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getDefaultSortingByView(), and getSelectableSortingModes().

Referenced by parse().

310  : string
311  {
312  $mode = $this->actor->getPref('pd_order_items_' . $this->currentView);
313 
314  if (!in_array($mode, $this->getSelectableSortingModes(), true)) {
315  $mode = $this->getDefaultSortingByView($this->currentView);
316  }
317 
318  return $mode;
319  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getListPresentationMode()

ilPDSelectedItemsBlockViewSettings::getListPresentationMode ( )

Definition at line 108 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isListPresentation().

108  : string
109  {
110  return self::PRESENTATION_LIST;
111  }
+ Here is the caller graph for this function:

◆ getMembershipsView()

ilPDSelectedItemsBlockViewSettings::getMembershipsView ( )

Definition at line 93 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isMembershipsViewActive().

93  : int
94  {
95  return self::VIEW_MY_MEMBERSHIPS;
96  }
+ Here is the caller graph for this function:

◆ getSelectablePresentationModes()

ilPDSelectedItemsBlockViewSettings::getSelectablePresentationModes ( )
Returns
string[]

Definition at line 335 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\access(), getActivePresentationsByView(), getAvailablePresentationsByView(), and getDefaultSortingByView().

Referenced by getEffectivePresentationMode(), and storeActorPresentationMode().

335  : array
336  {
337  if (!$this->access->canChangePresentation($this->actor->getId())) {
338  return [$this->getDefaultSortingByView($this->currentView)];
339  }
340  return array_intersect(
341  $this->getActivePresentationsByView($this->currentView),
342  $this->getAvailablePresentationsByView($this->currentView)
343  );
344  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectableSortingModes()

ilPDSelectedItemsBlockViewSettings::getSelectableSortingModes ( )
Returns
string[]

Definition at line 324 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getActiveSortingsByView(), and getAvailableSortOptionsByView().

Referenced by getEffectiveSortingMode(), and storeActorSortingMode().

324  : array
325  {
326  return array_intersect(
327  $this->getActiveSortingsByView($this->currentView),
328  $this->getAvailableSortOptionsByView($this->currentView)
329  );
330  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSelectedItemsView()

ilPDSelectedItemsBlockViewSettings::getSelectedItemsView ( )

Definition at line 98 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by getDefaultSortingByView(), getDefaultView(), isSelectedItemsViewActive(), and storeViewSorting().

98  : int
99  {
100  return self::VIEW_SELECTED_ITEMS;
101  }
+ Here is the caller graph for this function:

◆ getSortByAlphabetMode()

ilPDSelectedItemsBlockViewSettings::getSortByAlphabetMode ( )

Definition at line 148 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isSortedByAlphabet().

148  : string
149  {
150  return self::SORT_BY_ALPHABET;
151  }
+ Here is the caller graph for this function:

◆ getSortByLocationMode()

ilPDSelectedItemsBlockViewSettings::getSortByLocationMode ( )

Definition at line 138 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by getDefaultSortingByView(), and isSortedByLocation().

138  : string
139  {
140  return self::SORT_BY_LOCATION;
141  }
+ Here is the caller graph for this function:

◆ getSortByStartDateMode()

ilPDSelectedItemsBlockViewSettings::getSortByStartDateMode ( )

Definition at line 133 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isSortedByStartDate().

133  : string
134  {
135  return self::SORT_BY_START_DATE;
136  }
+ Here is the caller graph for this function:

◆ getSortByTypeMode()

ilPDSelectedItemsBlockViewSettings::getSortByTypeMode ( )

Definition at line 143 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isSortedByType().

143  : string
144  {
145  return self::SORT_BY_TYPE;
146  }
+ Here is the caller graph for this function:

◆ getStudyProgrammeView()

ilPDSelectedItemsBlockViewSettings::getStudyProgrammeView ( )

Definition at line 103 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isStudyProgrammeViewActive().

103  : int
104  {
105  return self::VIEW_MY_STUDYPROGRAMME;
106  }
+ Here is the caller graph for this function:

◆ getTilePresentationMode()

ilPDSelectedItemsBlockViewSettings::getTilePresentationMode ( )

Definition at line 113 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by isTilePresentation().

113  : string
114  {
115  return self::PRESENTATION_TILE;
116  }
+ Here is the caller graph for this function:

◆ isListPresentation()

ilPDSelectedItemsBlockViewSettings::isListPresentation ( )

Definition at line 199 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getListPresentationMode().

199  : bool
200  {
201  return $this->currentPresentationOption === $this->getListPresentationMode();
202  }
+ Here is the call graph for this function:

◆ isMembershipsViewActive()

ilPDSelectedItemsBlockViewSettings::isMembershipsViewActive ( )

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

References getMembershipsView().

Referenced by ilPDSelectedItemsBlockViewGUI\bySettings().

118  : bool
119  {
120  return $this->currentView === $this->getMembershipsView();
121  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSelectedItemsViewActive()

ilPDSelectedItemsBlockViewSettings::isSelectedItemsViewActive ( )

Definition at line 123 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSelectedItemsView().

123  : bool
124  {
125  return $this->currentView === $this->getSelectedItemsView();
126  }
+ Here is the call graph for this function:

◆ isSortedByAlphabet()

ilPDSelectedItemsBlockViewSettings::isSortedByAlphabet ( )

Definition at line 179 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSortByAlphabetMode().

179  : bool
180  {
181  return $this->currentSortOption === $this->getSortByAlphabetMode();
182  }
+ Here is the call graph for this function:

◆ isSortedByLocation()

ilPDSelectedItemsBlockViewSettings::isSortedByLocation ( )

Definition at line 184 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSortByLocationMode().

184  : bool
185  {
186  return $this->currentSortOption === $this->getSortByLocationMode();
187  }
+ Here is the call graph for this function:

◆ isSortedByStartDate()

ilPDSelectedItemsBlockViewSettings::isSortedByStartDate ( )

Definition at line 189 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSortByStartDateMode().

189  : bool
190  {
191  return $this->currentSortOption === $this->getSortByStartDateMode();
192  }
+ Here is the call graph for this function:

◆ isSortedByType()

ilPDSelectedItemsBlockViewSettings::isSortedByType ( )

Definition at line 174 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSortByTypeMode().

174  : bool
175  {
176  return $this->currentSortOption === $this->getSortByTypeMode();
177  }
+ Here is the call graph for this function:

◆ isStudyProgrammeViewActive()

ilPDSelectedItemsBlockViewSettings::isStudyProgrammeViewActive ( )

Definition at line 128 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getStudyProgrammeView().

128  : bool
129  {
130  return $this->currentView === $this->getStudyProgrammeView();
131  }
+ Here is the call graph for this function:

◆ isTilePresentation()

ilPDSelectedItemsBlockViewSettings::isTilePresentation ( )

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

References getTilePresentationMode().

194  : bool
195  {
196  return $this->currentPresentationOption === $this->getTilePresentationMode();
197  }
+ Here is the call graph for this function:

◆ isValidView()

ilPDSelectedItemsBlockViewSettings::isValidView ( int  $view)

Definition at line 381 of file class.ilPDSelectedItemsBlockViewSettings.php.

381  : bool
382  {
383  return in_array($view, $this->validViews, true);
384  }

◆ parse()

ilPDSelectedItemsBlockViewSettings::parse ( )

Definition at line 291 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getEffectivePresentationMode(), and getEffectiveSortingMode().

291  : void
292  {
293  $this->validViews = self::$availableViews;
294 
295  $this->currentSortOption = $this->getEffectiveSortingMode();
296  $this->currentPresentationOption = $this->getEffectivePresentationMode();
297  }
+ Here is the call graph for this function:

◆ storeActorPresentationMode()

ilPDSelectedItemsBlockViewSettings::storeActorPresentationMode ( string  $presentationMode)

Definition at line 346 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSelectablePresentationModes().

346  : void
347  {
348  if (in_array($presentationMode, $this->getSelectablePresentationModes())) {
349  $this->actor->writePref(
350  'pd_view_pres_' . $this->currentView,
351  $presentationMode
352  );
353  }
354  }
+ Here is the call graph for this function:

◆ storeActorSortingMode()

ilPDSelectedItemsBlockViewSettings::storeActorSortingMode ( string  $sortingMode)

Definition at line 356 of file class.ilPDSelectedItemsBlockViewSettings.php.

References getSelectableSortingModes().

356  : void
357  {
358  if (in_array($sortingMode, $this->getSelectableSortingModes())) {
359  $this->actor->writePref(
360  'pd_order_items_' . $this->currentView,
361  $sortingMode
362  );
363  }
364  }
+ Here is the call graph for this function:

◆ storeDefaultView()

ilPDSelectedItemsBlockViewSettings::storeDefaultView ( int  $view)

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

References ILIAS\Repository\settings().

286  : void
287  {
288  $this->settings->set('personal_items_default_view', (string) $view);
289  }
+ Here is the call graph for this function:

◆ storeViewPresentation()

ilPDSelectedItemsBlockViewSettings::storeViewPresentation ( int  $view,
string  $default,
array  $active 
)

Definition at line 231 of file class.ilPDSelectedItemsBlockViewSettings.php.

References ILIAS\Repository\settings().

231  : void
232  {
233  if (!in_array($default, $active, true)) {
234  $active[] = $default;
235  }
236  $this->settings->set('pd_def_pres_view_' . $view, $default);
237  $this->settings->set('pd_active_pres_view_' . $view, serialize($active));
238  }
+ Here is the call graph for this function:

◆ storeViewSorting()

ilPDSelectedItemsBlockViewSettings::storeViewSorting ( int  $view,
string  $type,
array  $active 
)

Definition at line 204 of file class.ilPDSelectedItemsBlockViewSettings.php.

References $type, getAvailableSortOptionsByView(), getSelectedItemsView(), and ILIAS\Repository\settings().

204  : void
205  {
206  if (!in_array($type, $active, true)) {
207  $active[] = $type;
208  }
209 
210  assert(in_array($type, $this->getAvailableSortOptionsByView($view), true));
211 
212  switch ($view) {
213  case $this->getSelectedItemsView():
214  $this->settings->set('selected_items_def_sort', $type);
215  break;
216 
217  default:
218  $this->settings->set('my_memberships_def_sort', $type);
219  break;
220  }
221 
222  $this->settings->set('pd_active_sort_view_' . $view, serialize($active));
223  }
$type
+ Here is the call graph for this function:

Field Documentation

◆ $access

DashboardAccess ilPDSelectedItemsBlockViewSettings::$access
protected

Definition at line 76 of file class.ilPDSelectedItemsBlockViewSettings.php.

◆ $actor

ilObjUser ilPDSelectedItemsBlockViewSettings::$actor
protected

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

Referenced by __construct(), and getActor().

◆ $availablePresentations

array ilPDSelectedItemsBlockViewSettings::$availablePresentations
staticprotected
Initial value:
= [
self::PRESENTATION_LIST,
self::PRESENTATION_TILE
]

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

◆ $availablePresentationsByView

array ilPDSelectedItemsBlockViewSettings::$availablePresentationsByView
staticprotected
Initial value:
= [
self::VIEW_SELECTED_ITEMS => [
self::PRESENTATION_LIST,
self::PRESENTATION_TILE
]

Definition at line 59 of file class.ilPDSelectedItemsBlockViewSettings.php.

◆ $availableSortOptions

array ilPDSelectedItemsBlockViewSettings::$availableSortOptions
staticprotected
Initial value:
= [
self::SORT_BY_LOCATION,
self::SORT_BY_TYPE,
self::SORT_BY_START_DATE
]

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

◆ $availableSortOptionsByView

array ilPDSelectedItemsBlockViewSettings::$availableSortOptionsByView
staticprotected
Initial value:
= [
self::VIEW_SELECTED_ITEMS => [
self::SORT_BY_LOCATION,
self::SORT_BY_TYPE,
self::SORT_BY_ALPHABET,
]

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

◆ $availableViews

array ilPDSelectedItemsBlockViewSettings::$availableViews
staticprotected
Initial value:
= [
self::VIEW_SELECTED_ITEMS,
self::VIEW_MY_MEMBERSHIPS,
self::VIEW_MY_STUDYPROGRAMME
]

Definition at line 27 of file class.ilPDSelectedItemsBlockViewSettings.php.

◆ $currentPresentationOption

string ilPDSelectedItemsBlockViewSettings::$currentPresentationOption = self::PRESENTATION_LIST
protected

Definition at line 75 of file class.ilPDSelectedItemsBlockViewSettings.php.

◆ $currentSortOption

string ilPDSelectedItemsBlockViewSettings::$currentSortOption = self::SORT_BY_LOCATION
protected

Definition at line 74 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by getCurrentSortOption().

◆ $currentView

int ilPDSelectedItemsBlockViewSettings::$currentView = self::VIEW_SELECTED_ITEMS
protected

Definition at line 73 of file class.ilPDSelectedItemsBlockViewSettings.php.

Referenced by getCurrentView().

◆ $settings

Setting ilPDSelectedItemsBlockViewSettings::$settings
protected

Definition at line 70 of file class.ilPDSelectedItemsBlockViewSettings.php.

◆ $validViews

array ilPDSelectedItemsBlockViewSettings::$validViews = []
protected

Definition at line 72 of file class.ilPDSelectedItemsBlockViewSettings.php.


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