tripal_jbrowse.module 974 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @file
  4. * Core functions of this module.
  5. */
  6. /**
  7. * Implements hook_init().
  8. */
  9. function tripal_jbrowse_init() {
  10. global $user;
  11. // Only show message to administrators.
  12. if (in_array('admin', $user->roles)) {
  13. $msg = t('We have detected that you still have Tripal JBrowse Nodes installed. This module is DEPRECATED! Please follow the migration instructions <a href="@url">here</a>.', ['@url' => 'https://tripal-jbrowse.readthedocs.io/en/latest/guide/install/migrate.html']);
  14. drupal_set_message($msg, 'warning');
  15. }
  16. }
  17. /**
  18. * Implements hook_theme().
  19. */
  20. function tripal_jbrowse_theme($existing, $type, $theme, $path) {
  21. $items = array(
  22. 'node__jbrowse_instance' => array(
  23. // Don't specify the path in the template name.
  24. // Unless you have your template inside a directory within this module.
  25. 'template' => 'theme/node--jbrowse-instance',
  26. 'variables' => array('node' => (object)array()),
  27. ),
  28. );
  29. return $items;
  30. }