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.

Class to store data for "hide if" rules for the settings form.

Author: Dmitrii Metelkin <dmitriim@catalyst-au.net>
Copyright: 2019 Catalyst IT
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 109 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

hideif_rule:: (5 methods):
  __construct()
  get_element()
  get_dependantname()
  get_condition()
  get_dependantvalue()


Class: hideif_rule  - X-Ref

Class to store data for "hide if" rules for the settings form.

__construct(string $element, string $dependantname, string $condition, string $dependantvalue)   X-Ref
Constructor.

param: string $element Name of the element to hide.
param: string $dependantname Name of the element that $element is dependant on.
param: string $condition Condition. E.g. 'eq', 'noteq' and etc.
param: string $dependantvalue Value to check the $condition against.

get_element()   X-Ref
Return name of the element to hide.

return: string

get_dependantname()   X-Ref
Returns name of the element that $element is dependant on.

return: string

get_condition()   X-Ref
Returns condition. E.g. 'eq', 'noteq' and etc

return: string

get_dependantvalue()   X-Ref
Returns value to check the $condition against.

return: string