From 13b10c2886165fd95229bf28bb758c8fba59480d Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 19 Dec 2020 13:14:54 +0100 Subject: [PATCH] Add `IAutoCompleteFormField` --- .../field/IAutoCompleteFormField.class.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/form/builder/field/IAutoCompleteFormField.class.php diff --git a/wcfsetup/install/files/lib/system/form/builder/field/IAutoCompleteFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/IAutoCompleteFormField.class.php new file mode 100644 index 0000000000..f3543e3985 --- /dev/null +++ b/wcfsetup/install/files/lib/system/form/builder/field/IAutoCompleteFormField.class.php @@ -0,0 +1,30 @@ + + * @package WoltLabSuite\Core\System\Form\Builder\Field + * @see https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofilling-form-controls:-the-autocomplete-attribute + * @since 5.4 + */ +interface IAutoCompleteFormField { + /** + * Sets the `autocomplete` attribute of the form field. + * + * Multiple tokens can be separated by spaces and if `null` is given, the attribute is unset. + * + * @throws \InvalidArgumentException if an invalid `autocomplete` token is included in the attribute value + */ + public function autoComplete(?string $autocomplete): self; + + /** + * Returns the `autocomplete` attribute of the form field. + * + * If `null` is returned, no `autocomplete` attribute will be set. + */ + public function getAutoComplete(): ?string; +} -- 2.20.1