Source string
The variables available to your code include:
!example@fields
. To set the value of the field, set@entity_field
. For multi-value computed fields continue with@entity_field_multi
. Here's a simple example which sets the computed field's value to the value of the sum of the number fields (@field_a
and@field_b
) in a node entity:Alternately, this code can be supplied by your own custom function named:
@compute_func(&$entity_field, $entity_type, $entity, $field, $instance, $langcode, $items)
.
Used at the following places
- computed_field: 1.x-1.1.3 (1)