tripal_example.admin.inc 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * @file
  4. * This file contains the functions used for administration of the module
  5. *
  6. */
  7. function tripal_example_admin_examples_listing() {
  8. $output = '';
  9. // set the breadcrumb
  10. $breadcrumb = array();
  11. $breadcrumb[] = l('Home', '<front>');
  12. $breadcrumb[] = l('Administration', 'admin');
  13. $breadcrumb[] = l('Tripal', 'admin/tripal');
  14. $breadcrumb[] = l('Chado', 'admin/tripal/chado');
  15. $breadcrumb[] = l('Examples', 'admin/tripal/chado/tripal_example');
  16. drupal_set_breadcrumb($breadcrumb);
  17. // EXPLANATION: Typically for all Tripal modules the home administrative
  18. // page for the module contains a search form to help the adminstrator
  19. // locate records. The following example code adds a default View to
  20. // the page
  21. /*
  22. // Add the view
  23. $view = views_embed_view('tripal_example_admin_examples','default');
  24. if (isset($view)) {
  25. $output .= $view;
  26. }
  27. else {
  28. $output .= '<p>The Tripal Example Module uses primarily views to provide an '
  29. . 'administrative interface. Currently one or more views needed for this '
  30. . 'administrative interface are disabled. <strong>Click each of the following links to '
  31. . 'enable the pertinent views</strong>:</p>';
  32. $output .= '<ul>';
  33. $output .= '<li>'.l('Example Admin', 'admin/tripal/chado/tripal_example/views/examples/enable').'</li>';
  34. $output .= '</ul>';
  35. }
  36. */
  37. $output = 'Typically a search view goes here';
  38. return $output;
  39. }
  40. /**
  41. * Administrative settings form
  42. *
  43. * @ingroup tripal_example
  44. */
  45. function tripal_example_admin() {
  46. $form = array();
  47. $form['nothing'] = array(
  48. '#markup' => t('There are currently no settings to configure.')
  49. );
  50. return system_settings_form($form);
  51. }
  52. /**
  53. *
  54. * @ingroup tripal_example
  55. */
  56. function tripal_example_admin_validate($form, &$form_state) {
  57. }