views_handler_field_residues.inc
- 2.x tripal_feature/views_handlers/views_handler_field_residues.inc
- 3.x legacy/tripal_feature/views_handlers/views_handler_field_residues.inc
- 1.x tripal_feature/views_handlers/views_handler_field_residues.inc
Contains views_handler_field_residues field handler
File
legacy/tripal_feature/views_handlers/views_handler_field_residues.incView source
- <?php
- /**
- * @file
- * Contains views_handler_field_residues field handler
- */
-
- /**
- * A handler to provide proper displays for sequence residues.
- *
- * @ingroup tripal_legacy_feature
- * @ingroup views_field_handlers
- */
- class views_handler_field_residues extends views_handler_field {
-
- /**
- * {@inheritdoc}
- */
- function construct() {
- parent::construct();
- $this->additional_fields['residues'] = array('table' => 'feature', 'field' => 'residues');
- }
-
- /**
- * {@inheritdoc}
- */
- function query() {
- $this->ensure_my_table();
- $this->add_additional_fields();
- }
-
- /**
- * {@inheritdoc}
- */
- function render($values) {
- // add a <br> every 100 bp
- return ereg_replace("(.{100})", "\\1<br />", $values->feature_residues);
-
- }
- }