field_attach_load

  1. drupal
    1. drupal7
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.

Übergabeparameter

$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.

Rückgabewert

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.

Verwandte Themen

▾ 13 functions call field_attach_load()

FieldAttachTestCase::testFieldAttachCache in modules/field/field.test
Test field cache.
FieldAttachTestCase::testFieldAttachCreateRenameBundle in modules/field/field.test
FieldAttachTestCase::testFieldAttachDelete in modules/field/field.test
FieldAttachTestCase::testFieldAttachDeleteBundle in modules/field/field.test
FieldAttachTestCase::testFieldAttachLoadMultiple in modules/field/field.test
Test the 'multiple' load feature.
FieldAttachTestCase::testFieldAttachSaveLoad in modules/field/field.test
Check field values insert, update and load.
FieldAttachTestCase::testFieldAttachSaveMissingData in modules/field/field.test
Tests insert and update with missing or NULL fields.
FieldAttachTestCase::testFieldAttachSaveMissingDataDefaultValue in modules/field/field.test
Test insert with missing or NULL fields, with default value.
FieldSqlStorageTestCase::testFieldAttachLoad in modules/field/modules/field_sql_storage/field_sql_storage.test
Uses the mysql tables and records to verify field_load_revision works correctly.
field_test_entity_load in modules/simpletest/tests/field_test.module
node_load_multiple in modules/node/node.module
Load node objects from the database.
user_load_multiple in modules/user/user.module
Load multiple users based on certain conditions.
_field_attach_load_revision in modules/field/field.attach.inc
Load all fields for a previous version of each of a set of objects of a single object type.

Code

modules/field/field.autoload.inc, line 60

<?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

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen