function field_test_field_test_op in Drupal 7
Generic op to test _field_invoke behavior.
This simulates a field operation callback to be invoked by _field_invoke().
File
- modules/
field/ tests/ field_test.module, line 78
Code
function field_test_field_test_op($entity_type, $entity, $field, $instance, $langcode, &$items) {
return array(
$langcode => hash('sha256', serialize(array(
$entity_type,
$entity,
$field['field_name'],
$langcode,
$items,
))),
);
}