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.

This file defines an item of metadata which encapsulates a user's preferences.

Copyright: 2018 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 93 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

user_preference:: (4 methods):
  __construct()
  get_name()
  get_privacy_fields()
  get_summary()


Class: user_preference  - X-Ref

The user_preference type.

__construct($name, $summary = '')   X-Ref
Constructor to create a new user_preference types.

param: string  $name The name of the user preference.
param: string  $summary A description of what the preference is used for.

get_name()   X-Ref
The name of the user preference.

return: string

get_privacy_fields()   X-Ref
A user preference encapsulates a single field and has no sub-fields.

return: array

get_summary()   X-Ref
A summary of what this user preference is used for.

return: string