[ticket/17414] Add get_hidden_fields to interface

PHPBB-17414
This commit is contained in:
Marc Alexander 2024-10-05 17:11:30 +02:00
parent 3676e895f3
commit edce13c777
No known key found for this signature in database
GPG key ID: 50E0D2423696F995
2 changed files with 20 additions and 0 deletions

View file

@ -74,6 +74,19 @@ class legacy_wrapper implements plugin_interface
} }
} }
/**
* {@inheritDoc}
*/
public function get_hidden_fields(): array
{
if (method_exists($this->legacy_captcha, 'get_hidden_fields'))
{
return $this->legacy_captcha->get_hidden_fields();
}
return [];
}
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */

View file

@ -52,6 +52,13 @@ interface plugin_interface
*/ */
public function init(int $type): void; public function init(int $type): void;
/**
* Get hidden form fields for this captcha plugin
*
* @return array Hidden form fields
*/
public function get_hidden_fields(): array;
/** /**
* Validate the captcha with the given request data * Validate the captcha with the given request data
* *