You are here

public function CaptchaFontPreviewController::getFont in CAPTCHA 8

Main method that throw ImageResponse object to generate image.

Return value

\Drupal\image_captcha\StreamedResponse\CaptchaFontPreviewStreamedResponse Make a CaptchaImageResponse with the correct configuration and return it.

1 string reference to 'CaptchaFontPreviewController::getFont'
image_captcha.routing.yml in image_captcha/image_captcha.routing.yml
image_captcha/image_captcha.routing.yml

File

image_captcha/src/Controller/CaptchaFontPreviewController.php, line 54

Class

CaptchaFontPreviewController
Controller which generates the image from defined settings.

Namespace

Drupal\image_captcha\Controller

Code

public function getFont($token) {
  $this->killSwitch
    ->trigger();
  return new CaptchaFontPreviewStreamedResponse($this->config, $token);
}