materio_contactops.module 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * Implements hook_init().
  4. */
  5. // function materio_contactops_init() {
  6. // drupal_add_js(drupal_get_path('module', 'materio_contactops').'/js/materio_contactops.js');
  7. // }
  8. /**
  9. * Implements hook_permission().
  10. */
  11. function materio_contactops_permission() {
  12. $perms = array(
  13. 'view own company related materials' => array(
  14. 'title' => t('view own company related materials'),
  15. 'description' => t('view own company related materials'),
  16. )
  17. );
  18. return $perms;
  19. }
  20. function materio_contactops_menu(){
  21. $items = array();
  22. $base = array(
  23. );
  24. $items['user/%user/materials'] = array(
  25. 'title' => t('Materials'),
  26. 'page callback' => 'materio_contactops_materials',
  27. 'page arguments' => array(1),
  28. 'access arguments' => array('view own company related materials'),
  29. 'type' => MENU_LOCAL_TASK,
  30. 'file' => 'materio_contactops.pages.inc',
  31. );
  32. return $items;
  33. }
  34. /**
  35. * Implements hook_theme().
  36. */
  37. function materio_contactops_theme($existing, $type, $theme, $path) {
  38. return array(
  39. 'materio_contactops_materials' => array(
  40. 'template' => 'materio-contactops-materials',
  41. 'path' => drupal_get_path('module', 'materio_contactops').'/templates',
  42. 'arguments' => array(
  43. 'items' => array(),
  44. 'view_mode' => "teaser",
  45. 'pager' => NULL,
  46. 'count' => 0,
  47. )
  48. )
  49. );
  50. }
  51. function template_preprocess_materio_contactops_materials(&$vars){
  52. // dsm($vars, 'template_preprocess_materio_contactops_materials | vars');
  53. // $vars['actualities_infos'] = t('Actualities by materiO\'');
  54. $vars['materials_infos'] = t('');
  55. }