diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-09-09 21:21:54 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-09-09 21:21:54 +0000 |
commit | c33da192c13a357bf0c75bd556457da78f991a68 (patch) | |
tree | fc3e1b8fd377ba322bd58f3d7277ca21869390aa /modules/field/field.api.php | |
parent | a3f776f4d4620faa3fbe93656358a1ad96b290f9 (diff) | |
download | brdo-c33da192c13a357bf0c75bd556457da78f991a68.tar.gz brdo-c33da192c13a357bf0c75bd556457da78f991a68.tar.bz2 |
- Patch #567092 by rcross, yched, bjaspan: merge hook_field_formatter_info() and hook_theme().
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r-- | modules/field/field.api.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php index a06880d69..47c2da25c 100644 --- a/modules/field/field.api.php +++ b/modules/field/field.api.php @@ -663,14 +663,25 @@ function hook_field_widget_error($element, $error) { * of drupal_render() on the render structure built by field_attach_view(). * * The name of the theme hook invoked when displaying the values is derived - * from formatter type names, following the pattern: - * field_formatter_FORMATTER_NAME - * The module implementing the formatters needs to register those theme hooks - * using hook_theme(). + * from formatter type names, using the pattern field_formatter_FORMATTER_NAME. + * field.module takes care of exposing the corresponding theme functions + * through hook_theme(). Specifically, field.module defines the theme + * hook: + * + * @code + * 'field_formatter_FORMATTER_NAME' => array( + * 'arguments' => array('element' => NULL), + * ) + * @code + * + * If a formatter requires a different theme hook definition, + * implement hook_theme_registry_alter(). * * @see hook_field_formatter_info(). * @see hook_field_formatter_info_alter(). * @see theme_field_formatter_FORMATTER_NAME(). + * @see hook_theme(). + * @see hook_theme_registry_alter(). * * @return * An array describing the formatter types implemented by the module. |