From: Matthias Schmidt Date: Wed, 23 Dec 2020 14:12:55 +0000 (+0100) Subject: Add `TInputAttributeFormField` X-Git-Tag: 5.4.0_Alpha_1~507^2~19 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d6d545758706b40436b78f46368ca690c4f04dfe;p=GitHub%2FWoltLab%2FWCF.git Add `TInputAttributeFormField` --- 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', + ] + ); + } +}