misc_tables.views.inc 1.2 KB

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