data__accession_formatter.inc 597 B

1234567891011121314151617181920212223
  1. <?php
  2. class data__accession_formatter extends ChadoFieldFormatter {
  3. // The default lable for this field.
  4. public static $default_label = 'Site Accession';
  5. // The list of field types for which this formatter is appropriate.
  6. public static $field_types = array('data__accession');
  7. /**
  8. * @see TripalFieldFormatter::view()
  9. */
  10. public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
  11. foreach ($items as $delta => $item) {
  12. $element[$delta] = array(
  13. '#type' => 'markup',
  14. '#markup' => $item['value'],
  15. );
  16. }
  17. }
  18. }