@@ 305-320 (lines=16) @@ | ||
302 | * @param int $user_id The user id of the user that will receive the alert |
|
303 | * @return JsonResponse |
|
304 | */ |
|
305 | public static function imageAlertUser(string $bubble_key, string $display_type, string $image, string $message, string $title, string $url, string $url_message, int $user_id) |
|
306 | { |
|
307 | return (new RCONSocket([ |
|
308 | 'key' => 'imageAlertUser', |
|
309 | 'data' => [ |
|
310 | 'bubble_key' => $bubble_key, |
|
311 | 'display_type' => $display_type, |
|
312 | 'image' => $image, |
|
313 | 'message' => $message, |
|
314 | 'title' => $title, |
|
315 | 'url' => $url, |
|
316 | 'url_message' => $url_message, |
|
317 | 'user_id' => $user_id, |
|
318 | ], |
|
319 | ]))->run(); |
|
320 | } |
|
321 | ||
322 | /** |
|
323 | * Send an alert to all online users. |
|
@@ 333-347 (lines=15) @@ | ||
330 | * @param string $url_message The message of the url parameter that needs to be set. |
|
331 | * @return JsonResponse |
|
332 | */ |
|
333 | public static function imageHotelAlert(string $bubble_key, string $display_type, string $image, string $message, string $title, string $url, string $url_message) |
|
334 | { |
|
335 | return (new RCONSocket([ |
|
336 | 'key' => 'imageAlertUser', |
|
337 | 'data' => [ |
|
338 | 'bubble_key' => $bubble_key, |
|
339 | 'display_type' => $display_type, |
|
340 | 'image' => $image, |
|
341 | 'message' => $message, |
|
342 | 'title' => $title, |
|
343 | 'url' => $url, |
|
344 | 'url_message' => $url_message, |
|
345 | ], |
|
346 | ]))->run(); |
|
347 | } |
|
348 | ||
349 | /** |
|
350 | * Add progress to an user achievement. |