Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Currently, the entire hook_user_display() is not used, because there is no working UI module.
If there was one, then depending on $op
- "elements": Returns an array of "decorators", keyed by the callback to invoke. Each element uses a FAPI-alike structure, defining a form element for the UI to configure the decorator when enabled. A custom property '#category' tells about decorator type (not fully fleshed out yet, but that was the idea).
- "classes": Returns an array of user display classes used by the implementing module, keyed by the internal class name. Each class should define a 'name' and 'description'.
With both sets, the UI module is able to allow the administrator to create a mapping between classes and "styles". A style consists of one or multiple decorators (elements).
Most modules would only implement "classes" - as long as they do not provide content that can be displayed for a user.
Comments
Comment #1
sunCurrently, the entire hook_user_display() is not used, because there is no working UI module.
If there was one, then depending on $op
- "elements": Returns an array of "decorators", keyed by the callback to invoke. Each element uses a FAPI-alike structure, defining a form element for the UI to configure the decorator when enabled. A custom property '#category' tells about decorator type (not fully fleshed out yet, but that was the idea).
- "classes": Returns an array of user display classes used by the implementing module, keyed by the internal class name. Each class should define a 'name' and 'description'.
With both sets, the UI module is able to allow the administrator to create a mapping between classes and "styles". A style consists of one or multiple decorators (elements).
Most modules would only implement "classes" - as long as they do not provide content that can be displayed for a user.