2 * Implements hook_xmlrpc_alter().
4 function {{ machine_name }}_xmlrpc_alter(&$methods) {
5 // Directly change a simple method.
6 $methods['drupal.login'] = 'mymodule_login';
8 // Alter complex definitions.
9 foreach ($methods as $key => &$method) {
10 // Skip simple method definitions.
14 // Perform the wanted manipulation.
15 if ($method[0] == 'drupal.site.ping') {
16 $method[1] = 'mymodule_directory_ping';