data__sequence_checksum_formatter.inc
File
tripal_chado/includes/TripalFields/data__sequence_checksum/data__sequence_checksum_formatter.incView source
- <?php
-
- class data__sequence_checksum_formatter extends ChadoFieldFormatter {
- // The default lable for this field.
- public static $default_label = 'Sequence checksum';
-
- // The list of field types for which this formatter is appropriate.
- public static $field_types = array('data__sequence_checksum');
-
- /**
- * @see TripalFieldFormatter::view()
- */
- public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
- foreach ($items as $delta => $item) {
- $content = key_exists('value', $item) ? $item['value'] : '';
- $element[$delta] = array(
- // We create a render array to produce the desired markup,
- '#type' => 'markup',
- '#markup' => $content,
- );
- }
- }
- }