| @@ -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(); |