/** * @inheritdoc * * Takes the decision of rendering the widget or not depending on the number * of requests made from the client IP. */ public function run() { $captchaControl = new CaptchaControl(['model' => $this->model]); if ($captchaControl->hasReachedRequestNumber()) { parent::run(); } }