null ]; parent::__construct( $params ); $this->key = $params['key']; $this->error = $params['error']; $this->mName = 'h-captcha-response'; } /** * @inheritDoc */ public function getInputHTML( $value ) { $out = $this->mParent->getOutput(); $out->addHeadItem( 'h-captcha', "" ); HCaptcha::addCSPSources( $out->getCSP() ); return Html::element( 'div', [ 'class' => [ 'h-captcha', 'mw-confirmedit-captcha-fail' => (bool)$this->error, ], 'data-sitekey' => $this->key, ] ); } }