field_attach_load_revision

  1. drupal
    1. drupal7
Versionen
drupal7 field_attach_load_revision($obj_type, $objects)

Load all fields for a previous version of each of a set of objects of a single object type.

Loading different versions of the same objects is not supported, and should be done by separate calls to the function.

Ü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 'revision key' filled.

Rückgabewert

s On return, the objects in $objects are modified by having the appropriate set of fields added.

This function is an autoloader for _field_attach_load_revision() in modules/field/field.attach.inc.

Verwandte Themen

▾ 5 functions call field_attach_load_revision()

FieldAttachTestCase::testFieldAttachDelete in modules/field/field.test
FieldAttachTestCase::testFieldAttachSaveLoad in modules/field/field.test
Check field values insert, update and load.
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.

Code

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

<?php
function field_attach_load_revision($obj_type, $objects) {
  require_once DRUPAL_ROOT . '/modules/field/field.attach.inc';
  return _field_attach_load_revision($obj_type, $objects);
}
?>

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