Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 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