You are here

function field_test_field_attach_view_alter in Drupal 7

Implements hook_field_attach_view_alter().

1 string reference to 'field_test_field_attach_view_alter'
FieldDisplayAPITestCase::testFieldViewField in modules/field/tests/field.test
Test the field_view_field() function.

File

modules/field/tests/field_test.module, line 219

Code

function field_test_field_attach_view_alter(&$output, $context) {
  if (!empty($context['display']['settings']['alter'])) {
    $output['test_field'][] = array(
      '#markup' => 'field_test_field_attach_view_alter',
    );
  }
  if (isset($output['test_field'])) {
    $output['test_field'][] = array(
      '#markup' => 'field language is ' . $context['language'],
    );
  }
}