data__sequence_length_formatter.inc 828 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. class data__sequence_length_formatter extends TripalFieldFormatter {
  3. // The default lable for this field.
  4. public static $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. // The list of default settings for this formatter.
  8. public static $settings = array();
  9. /**
  10. *
  11. * @see TripalFieldFormatter::settingsForm()
  12. */
  13. public function settingsForm($view_mode, $form, &$form_state) {
  14. }
  15. /**
  16. *
  17. * @see TripalFieldFormatter::view()
  18. */
  19. public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
  20. foreach ($items as $delta => $item) {
  21. $element[$delta] = array(
  22. '#type' => 'markup',
  23. '#markup' => $item['value'],
  24. );
  25. }
  26. }
  27. }