forked from omeka/plugin-Coins
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CoinsPlugin.php
54 lines (49 loc) · 1.25 KB
/
CoinsPlugin.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
<?php
/**
* COinS
*
* @copyright Copyright 2007-2012 Roy Rosenzweig Center for History and New Media
* @license http://www.gnu.org/licenses/gpl-3.0.txt GNU GPLv3
*/
/**
* The COinS plugin.
*
* @package Omeka\Plugins\Coins
*/
class CoinsPlugin extends Omeka_Plugin_AbstractPlugin
{
protected $_hooks = array(
'public_items_show',
'admin_items_show',
'public_items_browse_each',
'admin_items_browse_simple_each',
);
/**
* Print out the COinS span on the public items show page.
*/
public function hookPublicItemsShow()
{
echo get_view()->coins(get_current_record('item'));
}
/**
* Print out the COinS span on the admin items show page.
*/
public function hookAdminItemsShow()
{
echo get_view()->coins(get_current_record('item'));
}
/**
* Print out the COinS span on the public items browse page.
*/
public function hookPublicItemsBrowseEach()
{
echo get_view()->coins(get_current_record('item'));
}
/**
* Print out the COinS span on the admin items browse page.
*/
public function hookAdminItemsBrowseSimpleEach()
{
echo get_view()->coins(get_current_record('item'));
}
}