added export companies as csv file function
This commit is contained in:
@@ -13,6 +13,12 @@
|
||||
* Implements hook_permission().
|
||||
*/
|
||||
function materio_contactops_permission() {
|
||||
$perms = array(
|
||||
'access company export' => array(
|
||||
'title' => t('access company export'),
|
||||
'description' => t('access company export'),
|
||||
)
|
||||
);
|
||||
$perms = array(
|
||||
'view own company related materials' => array(
|
||||
'title' => t('view own company related materials'),
|
||||
@@ -26,7 +32,13 @@ function materio_contactops_permission() {
|
||||
function materio_contactops_menu(){
|
||||
$items = array();
|
||||
|
||||
$base = array(
|
||||
$items['admin/content/companies/export'] = array(
|
||||
'title' => t('Export Companies'),
|
||||
'page callback' => 'materio_contactops_export',
|
||||
'page arguments' => array(),
|
||||
'access arguments' => array('access company export'),
|
||||
'type' => MENU_LOCAL_TASK,
|
||||
'file' => 'materio_contactops.pages.inc',
|
||||
);
|
||||
|
||||
$items['user/%user/materials'] = array(
|
||||
@@ -41,6 +53,25 @@ function materio_contactops_menu(){
|
||||
return $items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_menu_local_tasks_alter().
|
||||
*/
|
||||
function materio_contactops_menu_local_tasks_alter(&$data, $router_item, $root_path) {
|
||||
switch($root_path){
|
||||
case 'admin/content/companies' :
|
||||
$item = menu_get_item('admin/content/companies/export');
|
||||
if ($item['access']) {
|
||||
$data['actions']['output'][] = array(
|
||||
'#theme' => 'menu_local_action',
|
||||
'#link' => $item,
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user