mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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.
This commit is contained in:
parent
b15e416165
commit
349589b23b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user