ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilBookingPreferences.php
Go to the documentation of this file.
1<?php
2
26{
31 protected array $preferences;
32
37 public function __construct(array $preferences)
38 {
39 $this->preferences = [];
40 foreach ($preferences as $user_id => $obj_ids) {
41 if ($user_id > 0 && is_array($obj_ids)) {
42 foreach ($obj_ids as $obj_id) {
43 if (!isset($this->preferences[$user_id]) || !in_array($obj_id, $this->preferences[$user_id])) {
44 $this->preferences[$user_id][] = (int) $obj_id;
45 }
46 }
47 }
48 }
49 }
50
55 public function getPreferences(): array
56 {
57 return $this->preferences;
58 }
59}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPreferences()
Get user preferences.
__construct(array $preferences)
Constructor.