69 lines
1.6 KiB
Plaintext
69 lines
1.6 KiB
Plaintext
<?php
|
|
|
|
|
|
/**
|
|
* Implements hook_init().
|
|
*/
|
|
// function materio_contactops_init() {
|
|
// drupal_add_js(drupal_get_path('module', 'materio_contactops').'/js/materio_contactops.js');
|
|
// }
|
|
|
|
|
|
/**
|
|
* Implements hook_permission().
|
|
*/
|
|
function materio_contactops_permission() {
|
|
$perms = array(
|
|
'view own company related materials' => array(
|
|
'title' => t('view own company related materials'),
|
|
'description' => t('view own company related materials'),
|
|
)
|
|
);
|
|
|
|
return $perms;
|
|
}
|
|
|
|
function materio_contactops_menu(){
|
|
$items = array();
|
|
|
|
$base = array(
|
|
);
|
|
|
|
$items['user/%user/materials'] = array(
|
|
'title' => t('Materials'),
|
|
'page callback' => 'materio_contactops_materials',
|
|
'page arguments' => array(1),
|
|
'access arguments' => array('view own company related materials'),
|
|
'type' => MENU_LOCAL_TASK,
|
|
'file' => 'materio_contactops.pages.inc',
|
|
);
|
|
|
|
return $items;
|
|
}
|
|
|
|
/**
|
|
* Implements hook_theme().
|
|
*/
|
|
function materio_contactops_theme($existing, $type, $theme, $path) {
|
|
return array(
|
|
'materio_contactops_materials' => array(
|
|
'template' => 'materio-contactops-materials',
|
|
'path' => drupal_get_path('module', 'materio_contactops').'/templates',
|
|
'arguments' => array(
|
|
'items' => array(),
|
|
'view_mode' => "teaser",
|
|
'pager' => NULL,
|
|
'count' => 0,
|
|
)
|
|
)
|
|
);
|
|
}
|
|
|
|
|
|
function template_preprocess_materio_contactops_materials(&$vars){
|
|
// dsm($vars, 'template_preprocess_materio_contactops_materials | vars');
|
|
|
|
// $vars['actualities_infos'] = t('Actualities by materiO\'');
|
|
$vars['materials_infos'] = t('');
|
|
}
|