rdfs__type_formatter.inc

File

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