Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

(no description)

File Size: 147 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ToolSettings:: (3 methods):
  __construct()
  get()
  set()


Class: ToolSettings  - X-Ref

Class to implement the Tool Settings service

__construct($source, $endpoint, $simple = true)   X-Ref
Class constructor.

param: object       $source     The object to which the settings apply (ResourceLink, Context or ToolConsumer)
param: string       $endpoint   Service endpoint
param: boolean      $simple     True if the simple media type is to be used (optional, default is true)

get($mode = self::MODE_CURRENT_LEVEL)   X-Ref
Get the tool settings.

param: int          $mode       Mode for request (optional, default is current level only)
return: mixed The array of settings if successful, otherwise false

set($settings)   X-Ref
Set the tool settings.

param: array  $settings  An associative array of settings (optional, default is null)
return: HTTPMessage HTTP object containing request and response details