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.

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