Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Message API: Difference between revisions

From MoodleDocs
(Created page with "TODO: delete https://docs.moodle.org/dev/Messaging, this document replaces it. ==What is this thing?== This document describes how to make use of the Moodle messaging API to sen...")
 
m (Protected "Message API": Developer Docs Migration ([Edit=Allow only administrators] (indefinite)))
 
(35 intermediate revisions by 13 users not shown)
Line 1: Line 1:
TODO: delete https://docs.moodle.org/dev/Messaging, this document replaces it.
{{Template:Migrated|newDocId=/docs/apis/core/message/}}
 
==What is this thing?==
 
This document describes how to make use of the Moodle messaging API to send message to Moodle users.
 
If you are after a general introduction on using the Moodle messaging system go to https://docs.moodle.org/en/Messaging
 
If you are looking for implementation details of the messaging system's internal structure go to https://docs.moodle.org/dev/Messaging_2.0
 
If you are looking for instructions on the implementation of a custom message processor go to https://github.com/andyjdavis/moodle-custom-message-processor
 
If you are looking for instructions on sending messages programatically within Moodle then read on...
 
==Overview==
 
Moodle components have the ability to send message to users via the Moodle messaging system. Any type of component, for example a plugin or block, can register as a message producer.
 
==File locations==
 
The Message API is all in lib/messagelib.php and is automatically included for you during the page setup.
 
==Functions==
 
message_send() is the primary point of contact for the message API. Call it to send a message to a user. You can find a full description of the arguments that must be supplied at (link to phpdocs)
 
==Examples==
 
===How to register as a message producer===
 
===How to send a message===

Latest revision as of 11:52, 18 September 2023

Important:

This content of this page has been updated and migrated to the new Moodle Developer Resources. The information contained on the page should no longer be seen up-to-date.

Why not view this page on the new site and help us to migrate more content to the new site!