function field_test_field_attach_view_alter

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'],
        );
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.