summaryrefslogtreecommitdiff
path: root/modules/field/field.api.php
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-07 05:09:58 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-07 05:09:58 +0000
commit28a17bc5bf058aa27eb6cc82b3e19521aae8fc9f (patch)
treef7c57d448a8c8a588b51e3b75132efaef0313534 /modules/field/field.api.php
parent731bc4fd232501e4ddf868c77a85bc14331af7a0 (diff)
downloadbrdo-28a17bc5bf058aa27eb6cc82b3e19521aae8fc9f.tar.gz
brdo-28a17bc5bf058aa27eb6cc82b3e19521aae8fc9f.tar.bz2
#990148 by chx, jhodgdon: Provide context to hook_field_attach_view_alter().
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r--modules/field/field.api.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index 0b7b6787f..ed0d63fd1 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -1277,7 +1277,7 @@ function hook_field_attach_purge($entity_type, $entity, $field, $instance) {
}
/**
- * Perform alterations on field_attach_view().
+ * Perform alterations on field_attach_view() or field_view_field().
*
* This hook is invoked after the field module has performed the operation.
*
@@ -1287,7 +1287,13 @@ function hook_field_attach_purge($entity_type, $entity, $field, $instance) {
* An associative array containing:
* - entity_type: The type of $entity; for example, 'node' or 'user'.
* - entity: The entity with fields to render.
- * - view_mode: View mode, for example, 'full' or 'teaser'.
+ * - view_mode: View mode; for example, 'full' or 'teaser'.
+ * - display: Either a view mode string or an array of display settings. If
+ * this hook is being invoked from field_attach_view(), the 'display'
+ * element is set to the view mode string. If this hook is being invoked
+ * from field_view_field(), this element is set to the $display argument
+ * and the view_mode element is set to '_custom'. See field_view_field()
+ * for more information on what its $display argument contains.
* - language: The language code used for rendering.
*/
function hook_field_attach_view_alter(&$output, $context) {