Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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