Moodle PHP Documentation 5.0
Moodle 5.0.1+ (Build: 20250711) (61af040cd5f)
core_files\redactor\manager Class Reference

Public Member Functions

 get_errors ()
 Retrieves an array of error messages.
 
 get_service_classnames ()
 Returns a list of applicable redaction services.
 
 redact_file (string $mimetype, string $filepath,)
 Redacts the given file.
 
 redact_file_content (string $mimetype, string $filecontent,)
 Redacts the given file content.
 

Protected Member Functions

 get_file_services_for_mimetype (string $mimetype)
 Returns a list of file redaction services that support the given mime-type.
 

Member Function Documentation

◆ get_errors()

core_files\redactor\manager::get_errors ( )

Retrieves an array of error messages.

Return values
arrayAn array of error messages.

◆ get_file_services_for_mimetype()

core_files\redactor\manager::get_file_services_for_mimetype ( string $mimetype)
protected

Returns a list of file redaction services that support the given mime-type.

Parameters
string$mimetypeThe mime-type to filter by
Return values
services::file_redactor_service_interface[]An array of file redaction services that support the given mime-type.

◆ get_service_classnames()

core_files\redactor\manager::get_service_classnames ( )

Returns a list of applicable redaction services.

Return values
string[]list of service classnames.

◆ redact_file()

core_files\redactor\manager::redact_file ( string $mimetype,
string $filepath )

Redacts the given file.

Parameters
string$mimetypeThe mime-type of the file
string$filepathThe path to the file to redact
Return values
string|nullThe path to the redacted file or null if no redaction services are available.

◆ redact_file_content()

core_files\redactor\manager::redact_file_content ( string $mimetype,
string $filecontent )

Redacts the given file content.

Parameters
string$mimetypeThe mime-type of the file
string$filecontentThe file content to redact
Return values
string|nullThe content of the redacted file

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