Document that #theme can be an array

Created on 20 October 2012, over 11 years ago
Updated 29 March 2023, over 1 year ago

The FAPI docs say form elements' #theme property should be a string, but this property should be an array for *any* renderable element.

📌 Task
Status

Active

Component

API documentation files

Created by

🇬🇧United Kingdom Xano Southampton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    @berdir is correct: The value for #theme is usually a string, but it could be an array too. It is not required to be an array.

    I am not sure that needs to be documented, as there are few cases where an array is really necessary. (If an array were always expected, Drupal core would require an array by default.)

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I checked the 8.x-1.x branch for this project repository, but it is empty. I take the documentation files are not on this project anymore.

Production build 0.69.0 2024