You are here

public function CaptchaImageGeneratorController::image in CAPTCHA 8

Main method that throw ImageResponse object to generate image.

Return value

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

1 string reference to 'CaptchaImageGeneratorController::image'
image_captcha.routing.yml in image_captcha/image_captcha.routing.yml
image_captcha/image_captcha.routing.yml

File

image_captcha/src/Controller/CaptchaImageGeneratorController.php, line 84

Class

CaptchaImageGeneratorController
Controller which generates the image from defined settings.

Namespace

Drupal\image_captcha\Controller

Code

public function image() {
  $this->killSwitch
    ->trigger();
  return new CaptchaImageResponse($this->config, $this->logger, $this->connection, $this->fileSystem);
}