From 349589b23b8a318e557b8b02ff0ca88e5145a364 Mon Sep 17 00:00:00 2001 From: JorisDebonnet Date: Thu, 26 Sep 2019 02:39:39 +0200 Subject: [PATCH] Clarify that $title in FormField can accept ViewableData When constructing a FormField, an IDE would previously tell you the `$title` needs to be string (or null). Let's make it more clear that a ViewableData instance (such as `HTMLValue::create($title)`) is also accepted. This should help people more quickly find a solution to put html in labels. --- src/Forms/FormField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Forms/FormField.php b/src/Forms/FormField.php index 13eafc887..65482320b 100644 --- a/src/Forms/FormField.php +++ b/src/Forms/FormField.php @@ -331,7 +331,7 @@ class FormField extends RequestHandler * Creates a new field. * * @param string $name The internal field name, passed to forms. - * @param null|string $title The human-readable field label. + * @param null|string|SilverStripe\View\ViewableData $title The human-readable field label. * @param mixed $value The value of the field. */ public function __construct($name, $title = null, $value = null)