1 field_test.module field_test_field_widget_properties_user_alter(&$widget, $context)

Implements hook_field_widget_properties_ENTITY_TYPE_alter().

File

core/modules/field/tests/field_test/field_test.module, line 228
Helper module for the Field API tests.

Code

function field_test_field_widget_properties_user_alter(&$widget, $context) {
  // Always use buttons for the alter_test_options field on user forms.
  if ($context['field']['field_name'] == 'alter_test_options') {
    $widget['type'] = 'options_buttons';
  }
}