From d6d545758706b40436b78f46368ca690c4f04dfe Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Wed, 23 Dec 2020 15:12:55 +0100 Subject: [PATCH] Add `TInputAttributeFormField` --- .../field/TInputAttributeFormField.class.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 wcfsetup/install/files/lib/system/form/builder/field/TInputAttributeFormField.class.php diff --git a/wcfsetup/install/files/lib/system/form/builder/field/TInputAttributeFormField.class.php b/wcfsetup/install/files/lib/system/form/builder/field/TInputAttributeFormField.class.php new file mode 100644 index 0000000000..a52b33cb9e --- /dev/null +++ b/wcfsetup/install/files/lib/system/form/builder/field/TInputAttributeFormField.class.php @@ -0,0 +1,33 @@ + + * @package WoltLabSuite\Core\System\Form\Builder\Field + * @since 5.4 + */ +trait TInputAttributeFormField { + use TAttributeFormField { + getReservedFieldAttributes as private defaultGetReservedFieldAttributes; + } + + /** + * Returns a list of attributes that are not accessible via the field attribute methods. + * + * @return string[] + */ + protected static function getReservedFieldAttributes(): array { + return array_merge( + static::defaultGetReservedFieldAttributes(), + [ + 'name', + 'type', + 'value', + ] + ); + } +} -- 2.20.1