-
Notifications
You must be signed in to change notification settings - Fork 3
/
citation_exporter_extra.api.php
59 lines (57 loc) · 1.84 KB
/
citation_exporter_extra.api.php
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* @file
* Hooks provided by the Citation Exporter module.
*/
/**
* Implements hook_TYPE_alter
* Returns a list of available formats to download as an array that can be modified by other modules
* return array(
* TYPE => array (
* url => URL of the resource that will process the download
* title => (optional) title attribute that will be added to the URL
* )
* )
*
*
* @param $formats
*
* @return array array of formats, this will be displayed in the block configuration file, this DOES not defines commands for menu item callbacks
*/
function hook_mods_download_format_alter(&$formats) {
$formats = array_merge($formats, array(
'BibTex' => array(
'url' => 'islandora/object/[fedora:pid]/download_mods_as_bibtext',
'title' => "Compatible with Zotero"
),
'EndNote' => array(
'url' => 'islandora/object/[fedora:pid]/download_mods_as_endnote',
'title' => "Compatible with EndNote"
),
'MARC' => array(
'url' => 'islandora/object/[fedora:pid]/download_mods_as_marc'
),
'MARCXML' => array(
'url' => 'islandora/object/[fedora:pid]/download_mods_as_marcxml',
'title' => 'Compatible with XML viewers'
),
'MODS' => array(
'url' => 'islandora/object/[fedora:pid]/datastream/MODS/download',
'title' => 'Compatible with XML viewers'
),
'DublinCore' => array(
'url' => 'islandora/object/[fedora:pid]/datastream/DC/download',
'title' => 'Compatible with XML viewers'
),
'RIS' => array(
'url' => 'islandora/object/[fedora:pid]/download_mods_as_ris',
'title' => "Compatible with EndNote, Refworks, Zotero, and Reference Manager"
),
//'JSON',
'JSON-LD' => array(
'url' => 'islandora/object/[fedora:pid]/download_mods_as_jsond',
'title' => 'Compatible with Zotero'
),
));
return $formats;
}