| Versionen | |
|---|---|
| drupal7 | field_attach_load($obj_type, $objects, $age = FIELD_LOAD_CURRENT) |
Load all fields for the most current version of each of a set of objects of a single object type.
$obj_type The type of $object; e.g. 'node' or 'user'.
$objects An array of objects for which to load fields, keyed by object id. Each object needs to have its 'bundle key', 'id key' and (if applicable) 'revision key' filled.
$age FIELD_LOAD_CURRENT to load the most recent revision for all fields, or FIELD_LOAD_REVISION to load the version indicated by each object. Defaults to FIELD_LOAD_CURRENT; use field_attach_load_revision() instead of passing FIELD_LOAD_REVISION.
s Loaded field values are added to $objects. Fields with no values should be set as an empty array.
This function is an autoloader for _field_attach_load() in modules/field/field.attach.inc.
modules/
<?php
function field_attach_load($obj_type, $objects, $age = FIELD_LOAD_CURRENT) {
require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
return _field_attach_load($obj_type, $objects, $age);
}
?>
Kommentare
Kommentar hinzufügen