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.

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