39 self::VIEW_SELECTED_ITEMS => [
43 self::VIEW_MY_MEMBERSHIPS => [
48 self::VIEW_MY_STUDYPROGRAMME => []
55 self::VIEW_SELECTED_ITEMS => [
59 self::VIEW_MY_MEMBERSHIPS => [
63 self::VIEW_MY_STUDYPROGRAMME => []
103 $this->currentView = $view;
104 include_once(
"./Services/Dashboard/Access/class.DashboardAccess.php");
105 $this->access = new \ILIAS\Dashboard\Access\DashboardAccess();
204 return self::$availableSortOptionsByView[$view];
215 return self::$availablePresentationsByView[$view];
281 if (!in_array(
$type, $active)) {
289 $this->
settings->set(
'selected_items_def_sort', $type);
293 $this->
settings->set(
'my_memberships_def_sort', $type);
297 $this->
settings->set(
'pd_active_sort_view_' . $view, serialize($active));
308 $val = $this->
settings->get(
'pd_active_sort_view_' . $view);
323 if (!in_array($default, $active)) {
324 $active[] = $default;
326 $this->
settings->set(
'pd_def_pres_view_' . $view, $default);
327 $this->
settings->set(
'pd_active_pres_view_' . $view, serialize($active));
338 return $this->
settings->get(
'pd_def_pres_view_' . $view,
"list");
349 $val = $this->
settings->get(
'pd_active_pres_view_' . $view,
'');
361 return $this->
settings->get(
'disable_my_memberships', 0) == 0;
369 return $this->
settings->get(
'disable_my_offers', 0) == 0;
377 $this->
settings->set(
'disable_my_memberships', (
int) !$status);
385 $this->
settings->set(
'disable_my_offers', (
int) !$status);
417 $this->
settings->set(
'personal_items_default_view', $view);
457 $mode = $this->actor->getPref(
'pd_view_pres_' . $this->currentView);
472 $mode = $this->actor->getPref(
'pd_order_items_' . $this->currentView);
486 return array_intersect(
497 if (!$this->access->canChangePresentation($this->actor->getId())) {
500 return array_intersect(
512 $this->actor->writePref(
513 'pd_view_pres_' . $this->currentView,
525 $this->actor->writePref(
526 'pd_order_items_' . $this->currentView,
562 return in_array($view, $this->validViews);
An exception for terminatinating execution or to throw for unit testing.
Class ilPDSelectedItemsBlockViewSettings.
isStudyProgrammeViewActive()
storeActorPresentationMode(string $presentationMode)
storeViewSorting(int $view, string $type, array $active)
getActiveSortingsByView(int $view)
Get active sort options by view.
getDefaultPresentationByView(int $view)
Get default presentation.
getTilePresentationMode()
enableMemberships(bool $status)
storeDefaultView(int $view)
getDefaultSortingByView(int $view)
$currentPresentationOption
getEffectiveSortingMode()
enableSelectedItems(bool $status)
getEffectivePresentationMode()
static $availableSortOptionsByView
getActivePresentationsByView(int $view)
Get active presentations by view.
static $availablePresentationsByView
isSelectedItemsViewActive()
getListPresentationMode()
static $availablePresentations
getSelectableSortingModes()
storeViewPresentation(int $view, string $default, array $active)
Store default presentation.
__construct(ilObjUser $actor, int $view=self::VIEW_SELECTED_ITEMS)
ilPDSelectedItemsBlockViewSettings constructor.
storeActorSortingMode(string $sortingMode)
isMembershipsViewActive()
getAvailableSortOptionsByView(int $view)
Get available sort options by view.
static $availableSortOptions
getAvailablePresentationsByView(int $view)
Get available presentations by view.
getSelectablePresentationModes()
const VIEW_MY_STUDYPROGRAMME
const VIEW_SELECTED_ITEMS
const VIEW_MY_MEMBERSHIPS