Airnotifier helper manager class.  
 More...
|  | 
| static | enable_device ($deviceid, $enable) | 
|  | Enables or disables a registered user device so it can receive Push notifications. 
 | 
|  | 
|  | 
| string const | AIRNOTIFIER_PUBLICURL = 'https://messages.moodle.net' | 
|  | The Airnotifier public instance URL. 
 | 
|  | 
| int const | ENCRYPT_UNSUPPORTED_NOT_SEND = 0 | 
|  | Avoid sending notifications to devices not supporting encryption. 
 | 
|  | 
| int const | ENCRYPT_UNSUPPORTED_SEND = 1 | 
|  | Send notifications to devices not supporting encryption. 
 | 
|  | 
Airnotifier helper manager class. 
- Copyright
- 2012 Jerome Mouneyrac jerom.nosp@m.e@mo.nosp@m.odle..nosp@m.com 
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 
◆ check_configuration()
      
        
          | message_airnotifier_manager::check_configuration | ( |  | ) |  | 
      
 
Check the system configuration to detect possible issues. 
- Return values
- 
  
  
 
 
◆ 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 | $deviceid | the device id |  | bool | $enable | true to enable it, false to disable it |  
 
- Return values
- 
  
    | bool | true 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 | $appname | the app name . |  | int | $userid | if empty take the current user. |  
 
- Return values
- 
  
  
 
 
◆ has_enabled_devices()
      
        
          | message_airnotifier_manager::has_enabled_devices | ( | string | $appname, | 
        
          |  |  | int | $userid = null ) | 
      
 
Check whether the given user has enabled devices or not for the given app. 
- Parameters
- 
  
    | string | $appname | the app to check |  | int | $userid | the user to check the devices for (empty for current user) |  
 
- Return values
- 
  
    | bool | true when the user has enabled devices, false otherwise |  
 
 
 
◆ include_device_ajax()
      
        
          | message_airnotifier_manager::include_device_ajax | ( |  | ) |  | 
      
 
Include the relevant javascript and language strings for the device toolbox YUI module. 
- Return values
- 
  
  
 
 
◆ is_system_configured()
      
        
          | message_airnotifier_manager::is_system_configured | ( |  | ) |  | 
      
 
Tests whether the airnotifier settings have been configured. 
- Return values
- 
  
    | boolean | true if airnotifier is configured |  
 
 
 
◆ request_accesskey()
      
        
          | message_airnotifier_manager::request_accesskey | ( |  | ) |  | 
      
 
Request and access key to Airnotifier. 
- Return values
- 
  
    | mixed | The access key or false in case of error |  
 
 
 
◆ send_test_notification()
      
        
          | message_airnotifier_manager::send_test_notification | ( | stdClass | $user | ) |  | 
      
 
Send a test notification to the given user. 
- Parameters
- 
  
  
 
 
The documentation for this class was generated from the following file: