misc_tables.views.inc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. * @ingroup tripal_analysis_views
  19. */
  20. function retrieve_analysis_misc_tables_views_data() {
  21. $data = array();
  22. // Table: Feature---------------------------------------------------------------------------------
  23. // Calculated Field: Number of analysis' (Count -Int)
  24. // Provides the number of analysis' for a given feature
  25. $data['feature']['num_analysis'] = array(
  26. 'title' => "Number of analysis'",
  27. 'help' => "Provides a count of the number of analysis' associated with a given feature",
  28. 'field' => array(
  29. 'handler' => 'views_handler_field_chado_count',
  30. 'table_to_query' => 'analysisfeature',
  31. ),
  32. );
  33. return $data;
  34. }