data__sequence_length_formatter.inc

File

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