Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline Class Reference
Inheritance diagram for tool_brickfield\local\htmlchecker\brickfield_accessibility_guideline:
tool_brickfield\local\htmlchecker\guidelines\brickfield_guideline tool_brickfield\local\htmlchecker\guidelines\brickfield_textonly_guideline

Public Member Functions

 __construct (&$dom, &$css, array &$path, $arg=null, string $domain='en', bool $cmsmode=false)
 The class 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\brickfield_accessibility_guideline::__construct ( & $dom,
& $css,
array & $path,
$arg = null,
string $domain = 'en',
bool $cmsmode = false )

The class constructor.

Parameters
object$domThe current DOMDocument object
object$cssThe current brickfieldCSS object
array$pathThe current path
null$arg
string$domain
bool$cmsmode

Reimplemented in tool_brickfield\local\htmlchecker\guidelines\brickfield_guideline.

Member Function Documentation

◆ get_report()

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

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)

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 ( )

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)

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)

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' )

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: