field_attach_prepare_view

Versions
7
field_attach_prepare_view($obj_type, $objects, $build_mode = 'full')

Allow formatters to act on fieldable objects prior to rendering.

Related topics

▾ 6 functions call field_attach_prepare_view()

comment_build_content in modules/comment/comment.module
Builds a structured array representing the comment's content.
comment_build_multiple in modules/comment/comment.module
Construct a drupal_render() style array from an array of loaded comments.
node_build_multiple in modules/node/node.module
Construct a drupal_render() style array from an array of loaded nodes.
node_preview in modules/node/node.pages.inc
Generate a node preview.
taxonomy_term_page in modules/taxonomy/taxonomy.pages.inc
Menu callback; displays all nodes associated with a term.
user_build_content in modules/user/user.module
Builds a structured array representing the profile content.

Code

modules/field/field.attach.inc, line 1115

<?php
function field_attach_prepare_view($obj_type, $objects, $build_mode = 'full') {
  // First let the field types do their preparation.
  _field_invoke_multiple('prepare_view', $obj_type, $objects);
  // Then let the formatters do their own specific massaging.
  // field_default_prepare_view() takes care of dispatching to the correct
  // formatters according to the display settings for the build mode.
  _field_invoke_multiple_default('prepare_view', $obj_type, $objects, $build_mode);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.