misc_tables.views.inc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * @file
  4. * Purpose: Allows the analysis module to add fields to other module views
  5. *
  6. * For example, a field counting the number of analysis' associted with a given feature would be
  7. * added to the feature view as follows:
  8. * @code
  9. $data['feature']['num_analysis''] = array(
  10. 'title' => "Number of analysis'",
  11. 'help' => "Provides a count of the number of analysis' associated with a given feature",
  12. 'field' => array(
  13. 'handler' => 'views_handler_field_chado_count',
  14. 'table_to_query' => 'analysis_feature',
  15. ),
  16. );
  17. * @endcode
  18. *
  19. * @ingroup tripal_analysis_views
  20. */
  21. function retrieve_analysis_misc_tables_views_data() {
  22. $data = array();
  23. // Table: Feature---------------------------------------------------------------------------------
  24. // Calculated Field: Number of analysis' (Count -Int)
  25. // Provides the number of analysis' for a given feature
  26. $data['feature']['num_analysis'] = array(
  27. 'title' => "Number of analysis'",
  28. 'help' => "Provides a count of the number of analysis' associated with a given feature",
  29. 'field' => array(
  30. 'handler' => 'views_handler_field_chado_count',
  31. 'table_to_query' => 'analysisfeature',
  32. ),
  33. );
  34. return $data;
  35. }