Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | List of all members
message_airnotifier_manager Class Reference

Airnotifier helper manager class. More...

Public Member Functions

 get_user_devices ($appname, $userid=null)
 Return the user devices for a specific app. More...
 
 include_device_ajax ()
 Include the relevant javascript and language strings for the device toolbox YUI module. More...
 
 is_system_configured ()
 Tests whether the airnotifier settings have been configured. More...
 
 request_accesskey ()
 Request and access key to Airnotifier. More...
 

Static Public Member Functions

static enable_device ($deviceid, $enable)
 Enables or disables a registered user device so it can receive Push notifications. More...
 

Detailed Description

Airnotifier helper manager class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ enable_device()

static message_airnotifier_manager::enable_device (   $deviceid,
  $enable 
)
static

Enables or disables a registered user device so it can receive Push notifications.

Parameters
int$deviceidthe device id
bool$enabletrue to enable it, false to disable it
Return values
booltrue if the device was enabled, false in case of error
Since
Moodle 3.2

◆ get_user_devices()

message_airnotifier_manager::get_user_devices (   $appname,
  $userid = null 
)

Return the user devices for a specific app.

Parameters
string$appnamethe app name .
int$useridif empty take the current user.
Return values
arrayall the devices

◆ include_device_ajax()

message_airnotifier_manager::include_device_ajax ( )

Include the relevant javascript and language strings for the device toolbox YUI module.

Return values
bool

◆ is_system_configured()

message_airnotifier_manager::is_system_configured ( )

Tests whether the airnotifier settings have been configured.

Return values
booleantrue if airnotifier is configured

◆ request_accesskey()

message_airnotifier_manager::request_accesskey ( )

Request and access key to Airnotifier.

Return values
mixedThe access key or false in case of error

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