You are here

protected function CaptchaExamplesForm::buildChallenge in CAPTCHA 8

Returns a renderable array for a given CAPTCHA challenge.

1 call to CaptchaExamplesForm::buildChallenge()
CaptchaExamplesForm::buildForm in src/Form/CaptchaExamplesForm.php
Form constructor.

File

src/Form/CaptchaExamplesForm.php, line 105

Class

CaptchaExamplesForm
Displays the captcha settings form.

Namespace

Drupal\captcha\Form

Code

protected function buildChallenge($module, $challenge) {
  return [
    '#type' => 'captcha',
    '#captcha_type' => $module . '/' . $challenge,
    '#captcha_admin_mode' => TRUE,
  ];
}