class so__cds_formatter
Hierarchy
- class \TripalFieldFormatter
- class \ChadoFieldFormatter
- class \so__cds_formatter
- class \ChadoFieldFormatter
Expanded class hierarchy of so__cds_formatter
1 string reference to 'so__cds_formatter'
- so__cds.inc in tripal_chado/
includes/ TripalFields/ so__cds/ so__cds.inc
File
- tripal_chado/
includes/ TripalFields/ so__cds/ so__cds_formatter.inc, line 3
View source
class so__cds_formatter extends ChadoFieldFormatter {
// The default lable for this field.
public static $default_label = 'Coding Sequence';
// The list of field types for which this formatter is appropriate.
public static $field_types = array('so__cds');
/**
* @see TripalFieldFormatter::view()
*/
public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
$content = 'There is no coding sequence.';
if (count($items) > 0 and $items[0]['value']) {
$num_bases = 50;
$content = '<pre class="residues-formatter">';
$content .= wordwrap($items[0]['value'], $num_bases, "<br>", TRUE);
$content .= '</pre>';
}
$element[0] = array(
// We create a render array to produce the desired markup,
'#type' => 'markup',
'#markup' => $content,
);
}
}
Members
Name | Modifiers | Type | Description |
---|---|---|---|
so__cds_formatter:: |
public static | property |
The default lable for this field. Overrides TripalFieldFormatter:: |
so__cds_formatter:: |
public static | property |
The list of field types for which this formatter is appropriate. Overrides TripalFieldFormatter:: |
so__cds_formatter:: |
public | function |
Overrides TripalFieldFormatter:: |
TripalFieldFormatter:: |
public static | property | The list of default settings for this formatter. |
TripalFieldFormatter:: |
protected | function | Updates a pager generated by theme('pager') for use with AJAX. |
TripalFieldFormatter:: |
protected | function | When constructing a pager for use by a field, all pagers must have a unique ID |
TripalFieldFormatter:: |
public static | function | Provides information about the formatter for this field. |
TripalFieldFormatter:: |
public | function | Provides the field's setting form. |
TripalFieldFormatter:: |
public | function | Provides a summary of the formatter settings. |
TripalFieldFormatter:: |
public | function | Instantiates a new TripalFieldFormatter object. |