Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_communication\processor Class Reference

Public Member Functions

 add_delete_user_flag (array $userids)
 Delete users flag for the instance users.
 
 create_instance_user_mapping (array $userids)
 Create communication user record for mapping and sync.
 
 delete_instance ()
 Delete communication data.
 
 delete_instance_non_synced_user_mapping (array $userids)
 Delete communication user record for userid who are not synced.
 
 delete_instance_user_mapping (array $userids)
 Delete communication user record for userid.
 
 delete_user_mappings_for_instance ()
 Delete communication user record for instance.
 
 get_all_delete_flagged_userids ()
 Get all the user ids flagged as deleted.
 
 get_all_userids_for_instance ()
 Get existing instance user ids.
 
 get_avatar ()
 Get communication instance id.
 
 get_avatar_filename ()
 Get the avatar file name.
 
 get_component ()
 Get communication instance component.
 
 get_context ()
 Get the context of the communication instance.
 
 get_context_id ()
 Get the context id of the communication instance.
 
 get_form_provider ()
 Get communication instance for form feature.
 
 get_id ()
 Get communication instance id after creating the instance in communication table.
 
 get_instance_id ()
 Get communication instance id.
 
 get_instance_type ()
 Get communication instance type.
 
 get_instance_userids (bool $synced=false, bool $deleted=false)
 Get non synced instance user ids for the instance.
 
 get_provider ()
 Get communication provider type.
 
 get_provider_status ()
 Get provider active status.
 
 get_room_name ()
 Get room name.
 
 get_room_provider ()
 Get communication instance id.
 
 get_room_url ()
 Get a room url.
 
 get_room_user_provider ()
 Get communication instance id.
 
 get_sync_provider ()
 Get the provider after checking if it supports sync features.
 
 get_user_provider ()
 Get communication instance id.
 
 is_avatar_synced ()
 Check if the avatar has been synced with the provider.
 
 is_instance_active ()
 Check if communication instance is active.
 
 mark_users_as_not_deleted (array $userids)
 Mark users as not deleted for the instance.
 
 mark_users_as_synced (array $userids)
 Mark users as synced for the instance.
 
 require_api_enabled ()
 Check if communication api is enabled.
 
 require_room_features ()
 Get communication instance id.
 
 require_room_user_features ()
 Get communication instance id.
 
 require_sync_provider_features ()
 Check if the provider supports sync features when required.
 
 require_user_features ()
 Get communication instance id.
 
 requires_form_features ()
 Check form feature available.
 
 reset_users_sync_flag (array $userids)
 Reset users sync flag for the instance.
 
 set_avatar_filename (?string $filename)
 Set the avatar file name.
 
 set_avatar_synced_flag (bool $synced)
 Indicate if the avatar has been synced with the provider.
 
 supports_form_features ()
 Check support for form feature.
 
 supports_room_features ()
 Get communication instance id.
 
 supports_room_user_features ()
 Get communication instance id.
 
 supports_sync_provider_features ()
 Check if the provider supports sync features.
 
 supports_user_features ()
 Get communication instance id.
 
 update_instance (?string $active=null, ?string $roomname=null,)
 Update the communication instance with any changes.
 

Static Public Member Functions

static create_instance (context $context, string $provider, int $instanceid, string $component, string $instancetype, string $roomname,)
 Create communication instance.
 
static is_provider_available (string $provider)
 Is the communication provider enabled and configured, or disabled.
 
static load_by_id (int $id)
 Load communication instance by id.
 
static load_by_instance (context $context, string $component, string $instancetype, int $instanceid, ?string $provider=null,)
 Load communication instance by instance id.
 
static set_provider_specific_form_definition (string $provider, MoodleQuickForm $mform)
 Set provider specific form definition.
 

Public Attributes

int const PROVIDER_ACTIVE = 1
 The provider active flag.
 
int const PROVIDER_INACTIVE = 0
 The provider inactive flag.
 
string const PROVIDER_NONE = 'none'
 The magic 'none' provider.
 

Protected Member Functions

 __construct (private stdClass $instancedata,)
 Communication processor constructor.
 

Constructor & Destructor Documentation

◆ __construct()

core_communication\processor::__construct ( private stdClass $instancedata)
protected

Communication processor constructor.

Parameters
stdClass$instancedataThe instance data object

Member Function Documentation

◆ add_delete_user_flag()

core_communication\processor::add_delete_user_flag ( array $userids)

Delete users flag for the instance users.

Parameters
array$useridsThe user ids

◆ create_instance()

static core_communication\processor::create_instance ( context $context,
string $provider,
int $instanceid,
string $component,
string $instancetype,
string $roomname )
static

Create communication instance.

Parameters
context$contextThe context of the item for the instance
string$providerThe communication provider
int$instanceidThe instance id
string$componentThe component name
string$instancetypeThe instance type
string$roomnameThe room name
Return values
processor|null

◆ create_instance_user_mapping()

core_communication\processor::create_instance_user_mapping ( array $userids)

Create communication user record for mapping and sync.

Parameters
array$useridsThe user ids

◆ delete_instance_non_synced_user_mapping()

core_communication\processor::delete_instance_non_synced_user_mapping ( array $userids)

Delete communication user record for userid who are not synced.

Parameters
array$useridsThe user ids

◆ delete_instance_user_mapping()

core_communication\processor::delete_instance_user_mapping ( array $userids)

Delete communication user record for userid.

Parameters
array$useridsThe user ids

◆ get_all_delete_flagged_userids()

core_communication\processor::get_all_delete_flagged_userids ( )

Get all the user ids flagged as deleted.

Return values
array

◆ get_all_userids_for_instance()

core_communication\processor::get_all_userids_for_instance ( )

Get existing instance user ids.

Return values
array

◆ get_avatar()

core_communication\processor::get_avatar ( )

Get communication instance id.

Return values
bool|stored_file

◆ get_avatar_filename()

core_communication\processor::get_avatar_filename ( )

Get the avatar file name.

Return values
string|null

◆ get_component()

core_communication\processor::get_component ( )

Get communication instance component.

Return values
string

◆ get_context()

core_communication\processor::get_context ( )

Get the context of the communication instance.

Return values
context

◆ get_context_id()

core_communication\processor::get_context_id ( )

Get the context id of the communication instance.

Return values
int

◆ get_form_provider()

core_communication\processor::get_form_provider ( )

Get communication instance for form feature.

Return values
form_provider

◆ get_id()

core_communication\processor::get_id ( )

Get communication instance id after creating the instance in communication table.

Return values
int

◆ get_instance_id()

core_communication\processor::get_instance_id ( )

Get communication instance id.

Return values
int

◆ get_instance_type()

core_communication\processor::get_instance_type ( )

Get communication instance type.

Return values
string

◆ get_instance_userids()

core_communication\processor::get_instance_userids ( bool $synced = false,
bool $deleted = false )

Get non synced instance user ids for the instance.

Parameters
bool$syncedThe synced status
bool$deletedThe deleted status
Return values
array

◆ get_provider()

core_communication\processor::get_provider ( )

Get communication provider type.

Return values
string|null

◆ get_provider_status()

core_communication\processor::get_provider_status ( )

Get provider active status.

Return values
int

◆ get_room_name()

core_communication\processor::get_room_name ( )

Get room name.

Return values
string|null

◆ get_room_provider()

core_communication\processor::get_room_provider ( )

Get communication instance id.

Return values
room_chat_provider

◆ get_room_url()

core_communication\processor::get_room_url ( )

Get a room url.

Return values
string|null

◆ get_room_user_provider()

core_communication\processor::get_room_user_provider ( )

Get communication instance id.

Return values
room_user_provider

◆ get_sync_provider()

core_communication\processor::get_sync_provider ( )

Get the provider after checking if it supports sync features.

Return values
synchronise_provider

◆ get_user_provider()

core_communication\processor::get_user_provider ( )

Get communication instance id.

Return values
user_provider

◆ is_avatar_synced()

core_communication\processor::is_avatar_synced ( )

Check if the avatar has been synced with the provider.

Return values
bool

◆ is_instance_active()

core_communication\processor::is_instance_active ( )

Check if communication instance is active.

Return values
bool

◆ is_provider_available()

static core_communication\processor::is_provider_available ( string $provider)
static

Is the communication provider enabled and configured, or disabled.

Parameters
string$providerprovider component name
Return values
bool

◆ load_by_id()

static core_communication\processor::load_by_id ( int $id)
static

Load communication instance by id.

Parameters
int$idThe communication instance id
Return values
processor|null

◆ load_by_instance()

static core_communication\processor::load_by_instance ( context $context,
string $component,
string $instancetype,
int $instanceid,
?string $provider = null )
static

Load communication instance by instance id.

Parameters
context$contextThe context of the item for the instance
string$componentThe component name
string$instancetypeThe instance type
int$instanceidThe instance id
string | null$providerThe provider type - if null will load for this context's active provider.
Return values
processor|null

◆ mark_users_as_not_deleted()

core_communication\processor::mark_users_as_not_deleted ( array $userids)

Mark users as not deleted for the instance.

Parameters
array$useridsThe user ids

◆ mark_users_as_synced()

core_communication\processor::mark_users_as_synced ( array $userids)

Mark users as synced for the instance.

Parameters
array$useridsThe user ids

◆ requires_form_features()

core_communication\processor::requires_form_features ( )

Check form feature available.

Return values
bool

◆ reset_users_sync_flag()

core_communication\processor::reset_users_sync_flag ( array $userids)

Reset users sync flag for the instance.

Parameters
array$useridsThe user ids

◆ set_avatar_filename()

core_communication\processor::set_avatar_filename ( ?string $filename)

Set the avatar file name.

Parameters
string | null$filename

◆ set_avatar_synced_flag()

core_communication\processor::set_avatar_synced_flag ( bool $synced)

Indicate if the avatar has been synced with the provider.

Parameters
boolean$syncedTrue if avatar has been synced.

◆ set_provider_specific_form_definition()

static core_communication\processor::set_provider_specific_form_definition ( string $provider,
MoodleQuickForm $mform )
static

Set provider specific form definition.

Parameters
string$providerThe provider name
MoodleQuickForm$mformThe moodle form

◆ supports_form_features()

core_communication\processor::supports_form_features ( )

Check support for form feature.

Return values
bool

◆ supports_room_features()

core_communication\processor::supports_room_features ( )

Get communication instance id.

Return values
bool

◆ supports_room_user_features()

core_communication\processor::supports_room_user_features ( )

Get communication instance id.

Return values
bool

◆ supports_sync_provider_features()

core_communication\processor::supports_sync_provider_features ( )

Check if the provider supports sync features.

Return values
boolwhether the provider supports sync features or not

◆ supports_user_features()

core_communication\processor::supports_user_features ( )

Get communication instance id.

Return values
bool

◆ update_instance()

core_communication\processor::update_instance ( ?string $active = null,
?string $roomname = null )

Update the communication instance with any changes.

Parameters
null | string$activeActive state of the instance (processor\PROVIDER_ACTIVE or processor\PROVIDER_INACTIVE)
null | string$roomnameThe room name

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