You are here

function example_field_formatter_view in Coder 8.3

Same name and namespace in other branches
  1. 8.2 coder_sniffer/Drupal/Test/WhiteSpace/ScopeIndentUnitTest.inc \example_field_formatter_view()
  2. 8.3.x tests/Drupal/WhiteSpace/ScopeIndentUnitTest.inc \example_field_formatter_view()

Implements hook_field_formatter_view().

File

tests/Drupal/WhiteSpace/ScopeIndentUnitTest.inc, line 27

Code

function example_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  switch ($display['type']) {
    case 'example_schema_format':
      foreach ($items as $delta => $item) {
        $element[$delta]['#markup'] = theme('example_formatter_default', $item);
      }
      break;
  }
  return $element;
}