class sio__vocabulary_formatter
Hierarchy
- class \TripalFieldFormatter
- class \ChadoFieldFormatter
- class \sio__vocabulary_formatter
- class \ChadoFieldFormatter
Expanded class hierarchy of sio__vocabulary_formatter
2 string references to 'sio__vocabulary_formatter'
- sio__vocabulary.inc in tripal_chado/
includes/ TripalFields/ sio__vocabulary/ sio__vocabulary.inc - tripal_chado_bundle_instances_info_custom in tripal_chado/
includes/ tripal_chado.fields.inc - Helper function for the hook_create_tripalfield_instance().
File
- tripal_chado/
includes/ TripalFields/ sio__vocabulary/ sio__vocabulary_formatter.inc, line 3
View source
class sio__vocabulary_formatter extends ChadoFieldFormatter {
// The default lable for this field.
public static $default_label = 'Vocabulary';
// The list of field types for which this formatter is appropriate.
public static $field_types = array('sio__vocabulary');
/**
* @see TripalFieldFormatter::view()
*/
public function view(&$element, $entity_type, $entity, $langcode, $items, $display) {
if (count($items) > 0) {
// The cardinality of this field is 1 so we don't have to
// iterate through the items array, as there will never be more than 1.
$element[0] = array(
'#type' => 'markup',
'#markup' => $items[0]['value'],
);
}
}
}
Members
Name | Modifiers | Type | Description |
---|---|---|---|
sio__vocabulary_formatter:: |
public static | property |
The default lable for this field. Overrides TripalFieldFormatter:: |
sio__vocabulary_formatter:: |
public static | property |
The list of field types for which this formatter is appropriate. Overrides TripalFieldFormatter:: |
sio__vocabulary_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. |