views_handler_field_computed_feature_nid.inc 534 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @file
  4. * @todo Add file header description
  5. */
  6. /**
  7. *
  8. *
  9. * @ingroup tripal_feature
  10. * @ingroup views_field_handlers
  11. */
  12. class views_handler_field_computed_feature_nid extends views_handler_field_numeric {
  13. function construct() {
  14. parent::construct();
  15. $this->additional_fields['feature_id'] = array('table' => 'feature', 'field' => 'feature_id');
  16. }
  17. function query() {
  18. $this->ensure_my_table();
  19. $this->add_additional_fields();
  20. }
  21. function render($values) {
  22. return $values->feature_nid;
  23. }
  24. }