tripal_example.admin.inc 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. /*
  18. // Add the view
  19. $view = views_embed_view('tripal_example_admin_examples','default');
  20. if (isset($view)) {
  21. $output .= $view;
  22. }
  23. else {
  24. $output .= '<p>The Tripal Example Module uses primarily views to provide an '
  25. . 'administrative interface. Currently one or more views needed for this '
  26. . 'administrative interface are disabled. <strong>Click each of the following links to '
  27. . 'enable the pertinent views</strong>:</p>';
  28. $output .= '<ul>';
  29. $output .= '<li>'.l('Example Admin', 'admin/tripal/chado/tripal_example/views/examples/enable').'</li>';
  30. $output .= '</ul>';
  31. }
  32. */
  33. return $output;
  34. }
  35. /**
  36. * Administrative settings form
  37. *
  38. * @ingroup tripal_example
  39. */
  40. function tripal_example_admin() {
  41. $form = array();
  42. $form['nothing'] = array(
  43. '#markup' => t('There are currently no settings to configure.')
  44. );
  45. return system_settings_form($form);
  46. }
  47. /**
  48. *
  49. * @ingroup tripal_example
  50. */
  51. function tripal_example_admin_validate($form, &$form_state) {
  52. }