Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
tool_brickfield\local\htmlchecker\reporters\report_demo Class Reference
Inheritance diagram for tool_brickfield\local\htmlchecker\reporters\report_demo:
tool_brickfield\local\htmlchecker\brickfield_accessibility_reporter

Public Member Functions

 complete_urls (string $html, string $url)
 Turns all relative links to absolute links so that the page can be rendered correctly.
 
 get_report ()
 The get_report method - we iterate through every test item and add additional attributes to build the report UI.
 
 parse_url (string $url)
 A helper function for completeURLs.
 
 set_absolute_path (&$element)
 Sets the absolute path for an element.
 
 set_options (array $options)
 Sets options for the reporter.
 
 strnpos ($haystack, $needle, $occurance, int $pos=0)
 Finds the final postion of a needle in the haystack.
 

Public Attributes

array $absoluteattributes = ['src', 'href']
 An array of attributes to search for to turn into absolute paths rather than relative paths.
 
array $classnames
 An array of the classnames to be associated with items.
 
object $css
 The current brickfieldaccessibilitycss object.
 
object $dom
 The current document's DOMDocument.
 
object null object $guideline = null
 A guideline object.
 
return $html
 
object $options
 Additional options for this reporter.
 
array $path
 The path to the current document.
 
array $report
 A collection of ReportItem objects.
 
array $translation
 An array of test names and the translation for the problems with it.
 

Member Function Documentation

◆ complete_urls()

tool_brickfield\local\htmlchecker\reporters\report_demo::complete_urls ( string $html,
string $url )

Turns all relative links to absolute links so that the page can be rendered correctly.

Parameters
string$htmlA complete HTML document
string$urlThe absolute URL to the document
Return values
stringA HTML document with all the relative links converted to absolute links

◆ get_report()

tool_brickfield\local\htmlchecker\reporters\report_demo::get_report ( )

The get_report method - we iterate through every test item and add additional attributes to build the report UI.

Return values
stringA fully-formed HTML document.

◆ parse_url()

tool_brickfield\local\htmlchecker\reporters\report_demo::parse_url ( string $url)

A helper function for completeURLs.

Parses a URL into an the scheme, host, and path

Parameters
string$urlThe URL to parse
Return values
arrayAn array that includes the scheme, host, and path of the URL

◆ set_absolute_path()

tool_brickfield\local\htmlchecker\brickfield_accessibility_reporter::set_absolute_path ( & $element)
inherited

Sets the absolute path for an element.

Parameters
object$elementA DOMElement object to turn into an absolute path

◆ set_options()

tool_brickfield\local\htmlchecker\brickfield_accessibility_reporter::set_options ( array $options)
inherited

Sets options for the reporter.

Parameters
array$optionsan array of options

◆ strnpos()

tool_brickfield\local\htmlchecker\reporters\report_demo::strnpos ( $haystack,
$needle,
$occurance,
int $pos = 0 )

Finds the final postion of a needle in the haystack.

Parameters
mixed$haystack
mixed$needle
mixed$occurance
int$pos
Return values
false|int

Member Data Documentation

◆ $classnames

array tool_brickfield\local\htmlchecker\reporters\report_demo::$classnames
Initial value:
= [
]
int const BA_TEST_SUGGESTION
Failure level seggestion.
Definition brickfield_accessibility.php:40
int const BA_TEST_MODERATE
Failure level moderate.
Definition brickfield_accessibility.php:37
int const BA_TEST_SEVERE
Failure level severe.
Definition brickfield_accessibility.php:34

An array of the classnames to be associated with items.


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