Back to Captcha class

Method setupField

public void
setupField
(\Joomla\CMS\Form\Field\CaptchaField $field, \SimpleXMLElement $element)
Method to react on the setup of a captcha field. Gives the possibility to change the field and/or the XML element for the field.
Parameters
  • \Joomla\CMS\Form\Field\CaptchaField $field Captcha field instance
  • \SimpleXMLElement $element XML form definition
Returns
  • void
Class: Captcha
Project: Joomla

Method setupField - Source code

/**
 * Method to react on the setup of a captcha field. Gives the possibility
 * to change the field and/or the XML element for the field.
 *
 * @param   \Joomla\CMS\Form\Field\CaptchaField  $field    Captcha field instance
 * @param   \SimpleXMLElement                    $element  XML form definition
 *
 * @return void
 */
public function setupField(\Joomla\CMS\Form\Field\CaptchaField $field, \SimpleXMLElement $element)
{
    if ($this->captcha === null) {
        return;
    }
    $arg = ['field' => $field, 'element' => $element];
    $result = $this->update('onSetupField', $arg);
    return $result;
}