hook_field_attach_pre_load

  1. drupal
    1. drupal7
Versionen
drupal7 hook_field_attach_pre_load($obj_type, &$objects, $age, &$skip_fields)

Act on field_attach_pre_load.

This hook allows modules to load data before the Field Storage API, optionally preventing the field storage module from doing so.

This lets 3rd party modules override, mirror, shard, or otherwise store a subset of fields in a different way than the current storage engine. Possible use cases include : per-bundle storage, per-combo-field storage...

Übergabeparameter

$obj_type The type of objects for which to load fields; e.g. 'node' or 'user'.

$objects An array of objects for which to load fields, keyed by object id.

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

$skip_fields An array keyed by names of fields whose data has already been loaded and therefore should not be loaded again. The values associated to these keys are not specified.

Rückgabewert

  • Loaded field values are added to $objects. Fields with no values should be

set as an empty array.

  • Loaded field names are set as keys in $skip_fields.

Verwandte Themen

Code

modules/field/field.api.php, line 497

<?php
function hook_field_attach_pre_load($obj_type, &$objects, $age, &$skip_fields) { }
?>

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