/**
* Get the HTML for the captcha.
*
* @param string $name The control name.
* @param string $id The id for the control.
* @param string $class Value for the HTML class attribute
*
* @return string The return value of the function "onDisplay" of the selected Plugin.
*
* @since 2.5
* @throws \RuntimeException
*/
public function display($name, $id, $class = '')
{
// Check if captcha is already loaded.
if ($this->captcha === null) {
return '';
}
// Initialise the Captcha.
if (!$this->initialise($id)) {
return '';
}
$arg = ['name' => $name, 'id' => $id ?: $name, 'class' => $class];
$result = $this->update('onDisplay', $arg);
return $result;
}