-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMOASDocsPlugin.php
47 lines (40 loc) · 1.07 KB
/
MOASDocsPlugin.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
<?php
/**
* @package omeka
* @subpackage moas-docs
* @copyright 2016 University of Nottingham
* @license MIT
* @author Alan Shortis <[email protected]>
*/
class MOASDocsPlugin extends Omeka_Plugin_AbstractPlugin
{
// Define Hooks
protected $_hooks = array('uninstall_message', 'define_acl');
//Define Filters
protected $_filters = array('admin_navigation_main');
public function hookDefineAcl($args)
{
$acl = $args['acl'];
$indexResource = new Zend_Acl_Resource('MOASDocs_Index');
$acl->add($indexResource);
}
public function filterAdminNavigationMain($nav)
{
$nav[] = array(
'label' => __('MOAS Docs'),
'uri' => url(
array(
'module'=>'moas-docs',
'controller'=>'index',
'action'=>'index',
), 'default'
),
'resource' => 'MOASDocs_Index'
);
return $nav;
}
public function hookUninstallMessage()
{
echo __('%sWarning%s: This will remove all MOAS Documentation from the Admin area.%s', '<p><strong>', '</strong>', '</p>');
}
}