PluginProbe
ShiftController Employee Shift Scheduling / 4.9.66
ShiftController Employee Shift Scheduling v4.9.66
4.9.97 4.9.96 4.9.95 4.9.74 4.9.75 4.9.76 4.9.77 4.9.78 4.9.84 4.9.85 4.9.87 4.9.91 4.9.92 trunk 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3.2.4 All 38 releases
← All changes | sh4/notifications/service.php +7 -7 4.9.954.9.66 View file →
@@ -12,11 +12,11 @@
12 12
13 13 public function getTemplate( SH4_Calendars_Model $calendar, $notificationId );
14 14 public function setTemplate( SH4_Calendars_Model $calendar, $notificationId, $template );
15 15
16 - public function setOnForUser( HC3_Users_Model $user, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL );
17 - public function setOffForUser( HC3_Users_Model $user, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL );
18 - public function isOnForUser( HC3_Users_Model $user, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL );
16 + public function setOnForUser( HC3_Users_Model $user, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL );
17 + public function setOffForUser( HC3_Users_Model $user, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL );
18 + public function isOnForUser( HC3_Users_Model $user, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL );
19 19 }
20 20
21 21 class SH4_Notifications_Service implements SH4_Notifications_IService
22 22 {
@@ -136,9 +136,9 @@
136 136 $return = $this->settings->get( $key );
137 137 return $return;
138 138 }
139 139
140 - public function setOnForUser( HC3_Users_Model $user, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
140 + public function setOnForUser( HC3_Users_Model $user, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
141 141 {
142 142 $key = $this->_settingsKeyForUser( $user, 'on', $calendar, $notificationId );
143 143
144 144 $this->settings->set( $key, 1 );
@@ -144,9 +144,9 @@
144 144 $this->settings->set( $key, 1 );
145 145 return $this;
146 146 }
147 147
148 - public function setOffForUser( HC3_Users_Model $user, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
148 + public function setOffForUser( HC3_Users_Model $user, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
149 149 {
150 150 $key = $this->_settingsKeyForUser( $user, 'on', $calendar, $notificationId );
151 151
152 152 $this->settings->set( $key, 0 );
@@ -152,9 +152,9 @@
152 152 $this->settings->set( $key, 0 );
153 153 return $this;
154 154 }
155 155
156 - public function isOnForUser( HC3_Users_Model $user, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
156 + public function isOnForUser( HC3_Users_Model $user, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
157 157 {
158 158 $key = $this->_settingsKeyForUser( $user, 'on', $calendar, $notificationId );
159 159
160 160 $ret = $this->settings->get( $key );
@@ -203,9 +203,9 @@
203 203
204 204 return $return;
205 205 }
206 206
207 - protected function _settingsKeyForUser( HC3_Users_Model $user, $pname, ?SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
207 + protected function _settingsKeyForUser( HC3_Users_Model $user, $pname, SH4_Calendars_Model $calendar = NULL, $notificationId = NULL )
208 208 {
209 209 $calendarId = $calendar ? $calendar->getId() : 'x';
210 210 $notificationId = $notificationId ? $notificationId : 'x';
211 211 $userId = $user->getId();