ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilBookingPreferences Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilBookingPreferences:

Public Member Functions

 __construct (array $preferences)
 Constructor. More...
 
 getPreferences ()
 Get user preferences. More...
 

Protected Attributes

array $preferences
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Booking preferences. Reflects the booking preferences of one booking pool. (data object)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilBookingPreferences.php.

Constructor & Destructor Documentation

◆ __construct()

ilBookingPreferences::__construct ( array  $preferences)

Constructor.

Parameters
int[][]$preferences

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

References $user_id, and ILIAS\Repository\int().

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  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getPreferences()

ilBookingPreferences::getPreferences ( )

Get user preferences.

Returns
int[][]

Definition at line 55 of file class.ilBookingPreferences.php.

References $preferences.

Referenced by ilBookingPreferencesManager\calculateBookings(), and ilBookingPreferencesDBRepository\savePreferencesOfUser().

55  : array
56  {
57  return $this->preferences;
58  }
+ Here is the caller graph for this function:

Field Documentation

◆ $preferences

array ilBookingPreferences::$preferences
protected

Definition at line 31 of file class.ilBookingPreferences.php.

Referenced by getPreferences().


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