Skip to content

Commit 1b05242

Browse files
[DOCS] Mention union types in ViewHelper docs (#6407)
* [DOCS] Mention union types in ViewHelper docs Releases: main * [TASK] Language checks --------- Co-authored-by: Sarah McCarthy <sarahmccarthy123@yahoo.com>
1 parent 2fe4446 commit 1b05242

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/ApiOverview/Fluid/DevelopCustomViewhelper.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,13 @@ through the array :php:`$this->arguments`, in method :php:`render()`.
115115

116116
.. tip::
117117

118-
Sometimes arguments can take various types. In this case, the type `mixed`
119-
should be used.
118+
If arguments can take various types, use a union type, for example
119+
`array|string`. If any type should be allowed, use `mixed`
120+
instead.
121+
122+
.. versionadded:: 14.0
123+
124+
Union types for ViewHelper arguments are available since TYPO3 14.0.
120125

121126
`render()`
122127
----------

0 commit comments

Comments
 (0)