/** * @param string $value * @return void */ public function isValid($value) { $captcha = new Captcha(); $captcha->setPrivateKey($this->captchaSettings['secret']); if ($captcha->isValid() === FALSE) { $this->addError('Captcha is niet correct', 1231982309); } }
/** * @param FluidView $view` */ protected function initializeView(FluidView $view) { $captcha = new Captcha(); $captcha->setPublicKey($this->captchaSettings['publicKey']); $view->assignMultiple(['captcha' => $captcha->displayHTML('clean'), 'jiuJitsuOptions' => $this->profileService->getJiuJitsuOptions(), 'buJitsuDoOptions' => $this->profileService->getBuJitsuDoOptions()]); }