From eafc4d5f2a207602367e34eb20c652a54842db06 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 21 Dec 2020 19:16:46 +0100 Subject: [PATCH] Add `IInputModeFormField` --- .../field/IInputModeFormField.class.php | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/form/builder/field/IInputModeFormField.class.php diff --git a/wcfsetup/install/files/lib/system/form/builder/field/IInputModeFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/IInputModeFormField.class.php new file mode 100644 index 0000000000..f9c50058a4 --- /dev/null +++ b/wcfsetup/install/files/lib/system/form/builder/field/IInputModeFormField.class.php @@ -0,0 +1,30 @@ + + * @package WoltLabSuite\Core\System\Form\Builder\Field + * @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute + * @since 5.4 + */ +interface IInputModeFormField { + /** + * Returns the `inputmode` attribute of the form field. + * + * If `null` is returned, no `inputmode` attribute will be set. + */ + public function getInputMode(): ?string; + + /** + * Sets the `inputmode` attribute of the form field. + * + * If `null` is given, the attribute is unset. + * + * @throws \InvalidArgumentException if an invalid `inputmode` token is included in the attribute value + */ + public function inputMode(?string $inputMode): self; +} -- 2.20.1