| Versionen | |
|---|---|
| drupal7 | field_attach_view($obj_type, &$object, $teaser = FALSE) |
Generate and return a structured content array tree suitable for drupal_render() for all of the fields on an object. The format of each field's rendered content depends on the display formatter and its settings.
$obj_type The type of $object; e.g. 'node' or 'user'.
$object The object with fields to render.
$teaser Whether to display the teaser only, as on the main page.
A structured content array tree for drupal_render().
This function is an autoloader for _field_attach_view() in modules/field/field.attach.inc.
modules/
<?php
function field_attach_view($obj_type, &$object, $teaser = FALSE) {
require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
return _field_attach_view($obj_type, $object, $teaser);
}
?>
Kommentare
Kommentar hinzufügen