function example_field_formatter_view in Coder 8.2
Same name and namespace in other branches
- 8.3 tests/Drupal/WhiteSpace/ScopeIndentUnitTest.inc \example_field_formatter_view()
- 8.3.x tests/Drupal/WhiteSpace/ScopeIndentUnitTest.inc \example_field_formatter_view()
Implements hook_field_formatter_view().
File
- coder_sniffer/
Drupal/ Test/ 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;
}