Document hook_user_display

NancyDru - March 11, 2009 - 18:37
Project:User Display API
Version:5.x-1.x-dev
Component:Documentation
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Description

The current docs don't show any parameters being fed to hook_user_display or give any idea of what should be returned.

#1

sun - March 11, 2009 - 19:51
Priority:minor» normal

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.

 
 

Drupal is a registered trademark of Dries Buytaert.