You are here

function field_extract_value in Field Extract Values 7

Fetch a single field value from an entity

Parameters

$entity_type: The type of the entity from which the value is being extracted.

$entity: The entity the field is part of, from which to extract the value.

$field_name: The field_name of the field to extract the value from.

$delta: Optional delta of value to extracted, defaults to 0, which is the first value, and only value for single value fields.

$options: Optional other options that could be applied to the value being extracted. See field_extract_values()

File

./field_extract.module, line 26
Field extract - Extension of the Field API to allow proper extraction of field values from entities

Code

function field_extract_value($entity_type, $entity, $field_name, $delta = 0, array $options = array()) {
  $options['delta'] = $delta;
  return field_extract_values($entity_type, $entity, $field_name, $options);
}