forked from legumeinfo/tripal_linkout
-
Notifications
You must be signed in to change notification settings - Fork 3
/
tripal_linkout.module
43 lines (39 loc) · 1.45 KB
/
tripal_linkout.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* @file
* The Linkout module generates links for a feature
*/
require_once 'includes/tripal_linkout.inc';
function tripal_linkout_help($path, $arg) {
switch ($path) {
case "admin/help#tripal_linkout":
return '<p>' . t("Generates external links") . '</p>';
break;
}
}
function tripal_linkout_menu() {
$items = array();
// used by phylotree, where we don't have gene names but do have "family representative" names
// (e.g. splice isoform or translation thereof)
// components of the URL are genus species transcript_name
$items['phylotree_links/%/%/%/json'] = array(
'page callback' => 'family_representative_linkout_json',
'page arguments' => array(1, 2, 3),
'type' => MENU_CALLBACK,
'access callback' => TRUE // allow all anonymous http clients
);
//used by context viewer, which has only the gene name to linkout with at this time
$items['gene_links/%/json'] = array(
'page callback' => 'gene_linkout_json',
'page arguments' => array(1),
'type' => MENU_CALLBACK,
'access callback' => TRUE // allow all anonymous http clients
);
//used by context viewer, which has only the gene name to linkout with at this time
$items['famreps_links'] = array(
'page callback' => 'famreps_linkout_json',
'type' => MENU_CALLBACK,
'access callback' => TRUE // allow all anonymous http clients
);
return $items;
}