mirror of
https://github.com/moodle/moodle.git
synced 2025-04-19 23:42:11 +02:00
webservice MDL-25389 Add some information about web service into the local/readme.txt
This commit is contained in:
parent
48561e1b94
commit
08509f0a6b
@ -64,7 +64,7 @@ Standard plugin features:
|
||||
* /local/xxx/db/access.php - definition of capabilities
|
||||
* /local/xxx/db/events.php - event handlers and subscripts
|
||||
* /local/xxx/db/messages.php - messaging registration
|
||||
* /local/xxx/db/external.php - web services and external functions descriptions
|
||||
* /local/xxx/db/services.php - definition of web services and web service functions
|
||||
* /local/xxx/lang/en/local_pluginname.php - language file
|
||||
|
||||
|
||||
@ -164,6 +164,34 @@ List of upgrade related files:
|
||||
/local/nicehack/db/upgrade.php - executed when version changes
|
||||
|
||||
|
||||
Local plugin web services
|
||||
-------------------------
|
||||
During plugin installation or upgrade, the web service definitions are read
|
||||
from /local/nicehack/db/services.php and are automatically installed/updated in Moodle.
|
||||
|
||||
sample files
|
||||
/local/nicehack/db/services.php
|
||||
$$functions = array (
|
||||
'nicehack_hello_world' => array(
|
||||
'classname' => 'local_nicehack_external',
|
||||
'methodname' => 'hello_world',
|
||||
'classpath' => 'local/nicehack/externallib.php',
|
||||
'description' => 'Get hello world string',
|
||||
'type' => 'read',
|
||||
),
|
||||
);
|
||||
$services = array(
|
||||
'Nice hack service 1' => array(
|
||||
'functions' => array ('nicehack_hello_world'),
|
||||
'enabled'=>1,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
You will need to write the /local/nicehack/externallib.php - external functions
|
||||
description and code. See some examples from the core files (/user/externallib.php,
|
||||
/group/externallib.php...).
|
||||
|
||||
|
||||
Other local customisation files
|
||||
===============================
|
||||
|
Loading…
x
Reference in New Issue
Block a user