Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

(no description)

File Size: 397 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: tool  - X-Ref

Brickfield accessibility tool base class.

All common properties and methods for all tool types.

get_tool_classnames()   X-Ref
Get a mapping of tool shortname => class name.

return: string[]

build_all_accessibilitytools()   X-Ref
Return an array with one of each tool instance.

return: tool[]

get_tool_names()   X-Ref
Get a list of formal tool names for each tool.

return: string[]

get_data()   X-Ref
Return the data needed for the renderer.

return: \stdClass

data_is_valid()   X-Ref
Implementing class should set the 'valid' property when get_data is called.

return: bool

data_error()   X-Ref
Implementing class should set an error string if data is invalidated in 'get_data';

return: string

set_filter(filter $filter)   X-Ref
Setter for filter property.

param: filter $filter

get_filter()   X-Ref
Getter for filter property.

return: filter|null

get_output_target()   X-Ref
Returns the output target for this tool's filter.

return: string

get_output()   X-Ref
Get the HTML output for display.

return: mixed

get_toolname()   X-Ref
Return the defined toolname.

return: mixed

get_toolshortname()   X-Ref
Return the defined toolshortname.

return: mixed

can_access(filter $filter, \context $context = null)   X-Ref
Verify that accessibility tools can be accessed in the provided context.

param: filter $filter
param: \context $context
return: bool

get_error_message()   X-Ref
Return any defined error message.

return: string

get_module_label(string $modulename)   X-Ref
Get module label for display

param: string $modulename
return: string

get_instance_name(string $component, string $table, ?int $cmid, ?int $courseid,?int $categoryid)   X-Ref
Get instance name for display

param: string $component
param: string $table
param: int $cmid
param: int $courseid
param: int $categoryid
return: string

toplevel_arguments(filter $filter = null)   X-Ref
Provide arguments required for the toplevel page, using any provided filter.

param: filter|null $filter
return: array

perpage_limits(int $perpage)   X-Ref
Override this to return any tool specific perpage limits.

param: int $perpage
return: int

base64_img_array()   X-Ref
Return array of base64 image formats.

return: array

base64_img_detected(string $htmlcode)   X-Ref
Detects if htmlcode contains base64 img data, for HTML display, such as errors page.

param: string $htmlcode
return: boolean

truncate_base64(string $htmlcode)   X-Ref
Truncate base64-containing htmlcode for HTML display, such as errors page.

param: string $htmlcode
return: string

get_check_description(string $check)   X-Ref
Return the correct language string for the provided check.

param: string $check
return: string