Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250706) (a6b17d8f6bd)
MoodleQuickForm_recaptcha Class Reference

recaptcha type form element More...

Inheritance diagram for MoodleQuickForm_recaptcha:

Public Member Functions

 __construct ($elementName=null, $elementLabel=null, $attributes=null)
 constructor
 
 export_for_template (renderer_base $output)
 
 get_force_ltr ()
 Get force LTR option.
 
 getHelpButton ()
 get html for help button
 
 MoodleQuickForm_recaptcha ($elementName=null, $elementLabel=null, $attributes=null)
 Old syntax of class constructor.
 
 toHtml ()
 Returns the reCAPTCHA element in HTML.
 
 verify ($responsestr)
 Checks recaptcha response with Google.
 

Public Attributes

string $_helpbutton =''
 html for help button, if empty then no help
 

Detailed Description

recaptcha type form element

HTML class for a recaptcha type element

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

MoodleQuickForm_recaptcha::__construct ( $elementName = null,
$elementLabel = null,
$attributes = null )

constructor

Parameters
string$elementName(optional) name of the recaptcha element
string$elementLabel(optional) label for recaptcha element
mixed$attributes(optional) Either a typical HTML attribute string or an associative array

Member Function Documentation

◆ get_force_ltr()

MoodleQuickForm_recaptcha::get_force_ltr ( )

Get force LTR option.

Return values
bool

◆ getHelpButton()

MoodleQuickForm_recaptcha::getHelpButton ( )

get html for help button

Return values
stringhtml for help button

◆ MoodleQuickForm_recaptcha()

MoodleQuickForm_recaptcha::MoodleQuickForm_recaptcha ( $elementName = null,
$elementLabel = null,
$attributes = null )

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated
since Moodle 3.1

◆ toHtml()

MoodleQuickForm_recaptcha::toHtml ( )

Returns the reCAPTCHA element in HTML.

Return values
stringThe HTML to render

◆ verify()

MoodleQuickForm_recaptcha::verify ( $responsestr)

Checks recaptcha response with Google.

Parameters
string$responsestr
Return values
bool

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