You are here

function field_test_field_update_forbid in Drupal 7

Implements hook_field_update_forbid().

File

modules/field/tests/field_test.field.inc, line 53
Defines a field type and its formatters and widgets.

Code

function field_test_field_update_forbid($field, $prior_field, $has_data) {
  if ($field['type'] == 'test_field' && $field['settings']['unchangeable'] != $prior_field['settings']['unchangeable']) {
    throw new FieldException("field_test 'unchangeable' setting cannot be changed'");
  }
}