tripal_ds.module 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. require_once "includes/tripal_ds.inc";
  3. require_once "includes/tripal_ds.ds.inc";
  4. function tripal_ds_init() {
  5. drupal_add_css(drupal_get_path('module', 'tripal_ds') . '/theme/css/tripaldsfeature.css');
  6. }
  7. /**
  8. * Implements hook_ds_layout_info() to define layouts from code in a module for
  9. * display suite
  10. */
  11. function tripal_ds_ds_layout_info() {
  12. $path = drupal_get_path('module', 'tripal_ds');
  13. $layouts = array(
  14. 'tripal_ds_feature' => array(
  15. 'label' => t('Tripal Feature Layout'),
  16. 'path' => $path . '/theme/templates',
  17. 'regions' => array(
  18. 'top' => t('Top'),
  19. 'left' => t('Left'),
  20. 'right' => t('Right'),
  21. 'bottom' => t('Bottom'),
  22. ),
  23. 'css' => TRUE,
  24. ),
  25. );
  26. return $layouts;
  27. }
  28. /*
  29. * General preprocess function to determine the HOOK for the subsequent preprocess functions
  30. * to target fields
  31. function tripal_ds_preprocess(&$vars, $hook) {
  32. if (isset($vars['elements']['#entity_type'])) {
  33. $function = __FUNCTION__ . '_' . $vars['elements']['#entity_type'];
  34. if (function_exists($function)) {
  35. $function($vars, $hook);
  36. }
  37. }
  38. }*/
  39. /*
  40. * Implements hook_bundle_create().
  41. *
  42. * This is a Triapl defined hook and is called in the TripalBundle::create()
  43. * function to allow modules to perform tasks when a bundle is created.
  44. function tripal_ds_bundle_create($bundle, $args) {
  45. _ds_layout_settings_info($bundle);
  46. } */