Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_brickfield\local\htmlchecker\guidelines\brickfield_guideline Class Reference
Inheritance diagram for tool_brickfield\local\htmlchecker\guidelines\brickfield_guideline:
tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline

Public Member Functions

 __construct (&$dom, &$css, array &$path, $arg=null, string $domain='en', bool $cmsmode=false)
 brickfield_guideline constructor.
 
 get_report ()
 Returns all the Report variable.
 
 get_severity (string $testname)
 Returns the severity level of a given test.
 
 get_tests ()
 Returns an array of all the tests associated with the current guideline.
 
 get_translation (string $testname)
 Returns the translation for a test name.
 
 load_translations (string $domain)
 Loads translations from a file.
 
 run ($arg=null, string $language='en')
 Iterates through each test string, makes a new test object, and runs it against the current DOM.
 

Public Attributes

bool $cmsmode = false
 Whether we are running in CMS mode.
 
object $css
 The current brickfield CSS object.
 
object $dom
 The current document's DOMDocument.
 
array $path
 The path to the current document.
 
array $report
 An array of report objects.
 
array $severity = []
 An array of all the severity levels for every test.
 
array array $tests = []
 To store all the tests.
 
array $translations
 An array of translations for all this guideline's tests.
 

Constructor & Destructor Documentation

◆ __construct()

tool_brickfield\local\htmlchecker\guidelines\brickfield_guideline::__construct ( & $dom,
& $css,
array & $path,
$arg = null,
string $domain = 'en',
bool $cmsmode = false )

brickfield_guideline constructor.

Parameters
DOMDocument$dom
brickfield_accessibility_css$css
array$path
null$arg
string$domain
bool$cmsmode
Exceptions
dml_exception

Reimplemented from tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline.

Member Function Documentation

◆ get_report()

tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline::get_report ( )
inherited

Returns all the Report variable.

Return values
mixedLook to your report to see what it returns

◆ get_severity()

tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline::get_severity ( string $testname)
inherited

Returns the severity level of a given test.

Parameters
string$testnameThe name of the test
Return values
intThe severity level

◆ get_tests()

tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline::get_tests ( )
inherited

Returns an array of all the tests associated with the current guideline.

Return values
array

◆ get_translation()

tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline::get_translation ( string $testname)
inherited

Returns the translation for a test name.

Parameters
string$testnameThe function name of the test
Return values
mixed

◆ load_translations()

tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline::load_translations ( string $domain)
inherited

Loads translations from a file.

This can be overriden, just as long as the local variable 'translations' is an associative array with test function names as the key

Parameters
string$domain

◆ run()

tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline::run ( $arg = null,
string $language = 'en' )
inherited

Iterates through each test string, makes a new test object, and runs it against the current DOM.

Parameters
null$arg
string$language

The documentation for this class was generated from the following file: