Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

(no description)

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

Defines 1 class


Class: renderer  - X-Ref

MFA renderer.

get_state_badge(string $state)   X-Ref
Returns the state of the factor as a badge.

param: string $state
return: string

available_factors()   X-Ref
Returns a list of factors which a user can add.

return: string

setup_factor(object $factor)   X-Ref
Returns the html section for factor setup

param: object $factor object of the factor class
return: string

active_factors()   X-Ref
Defines section with active user's factors.

return: string $html

not_enough_factors()   X-Ref
Generates notification text for display when user cannot login.

return: string $notification

factors_in_use_table(int $lookback)   X-Ref
Displays a table of all factors in use currently.

param: int $lookback the period to view.
return: string the HTML for the table

factors_locked_table()   X-Ref
Displays a table of all factors in use currently.

return: string the HTML for the table

factor_locked_users_table(object_factor $factor)   X-Ref
Displays a table of all users with a locked instance of the given factor.

param: object_factor $factor the factor class
return: string the HTML for the table

get_support_link()   X-Ref
Returns a rendered support link.
If the MFA guidance page is enabled, this is returned.
Otherwise, the site support link is returned.
If neither support link is configured, an empty string is returned.

return: string

mform_element(mixed $element, bool $required,bool $advanced, string|null $error, bool $ingroup)   X-Ref
Renders an mform element from a template

In certain situations, includes a script element which adds autosubmission behaviour.

param: mixed $element element
param: bool $required if input is required field
param: bool $advanced if input is an advanced field
param: string|null $error error message to display
param: bool $ingroup True if this element is rendered as part of a group
return: mixed string|bool

verification_form(object_factor $factor, login_form $form)   X-Ref
Renders the verification form.

param: object_factor $factor The factor to render the form for.
param: login_form $form The login form object.
return: string