-
Notifications
You must be signed in to change notification settings - Fork 0
/
expoInrapPlugin.php
132 lines (120 loc) · 4.24 KB
/
expoInrapPlugin.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/* ----------------------------------------------------------------------
* mediaImportPlugin.php :
* ----------------------------------------------------------------------
* CollectiveAccess
* Open-source collections management software
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2010 Whirl-i-Gig
*
* For more information visit http://www.CollectiveAccess.org
*
* This program is free software; you may redistribute it and/or modify it under
* the terms of the provided license as published by Whirl-i-Gig
*
* CollectiveAccess is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* This source code is free and modifiable under the terms of
* GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
* the "license.txt" file for details, or visit the CollectiveAccess web site at
* http://www.CollectiveAccess.org
*
* ----------------------------------------------------------------------
*/
class expoInrapPlugin extends BaseApplicationPlugin {
# -------------------------------------------------------
protected $description = 'CA : expoInrapPlugin';
# -------------------------------------------------------
private $opo_config;
private $ops_plugin_path;
# -------------------------------------------------------
public function __construct($ps_plugin_path) {
$this->ops_plugin_path = $ps_plugin_path;
$this->description = "expoInrapPlugin";
parent::__construct();
$this->opo_config = Configuration::load($ps_plugin_path.'/conf/expoInrap.conf');
}
/**
* Override checkStatus() to return true - the providencePluginUserMenuPlugin always initializes ok... (part to complete)
*/
public function checkStatus() {
return array(
'description' => $this->getDescription(),
'errors' => array(),
'warnings' => array(),
'available' => 1 //((bool)$this->opo_config->get('enabled'))
);
}
# -------------------------------------------------------
/**
* Add plugin user actions
*/
static function getRoleActionList() {
return array(
);
}
# -------------------------------------------------------
/**
* Add plugin user actions
*/
public function hookGetRoleActionList($pa_role_list) {
return $pa_role_list;
}
/**
* Insert activity menu
*/
public function hookRenderMenuBar($pa_menu_bar) {
if ($o_req = $this->getRequest()) {
$default_menu_action = array(
'displayName' => _t('Expositions'),
"default" => array(
'module' => 'expoInrap',
'controller' => 'Exposition',
'action' => 'IndexExpo'
),
'navigation' => array(
"Home" => array(
"displayName" => "Page d'accueil Galerie Muséale",
"default" => array(
'module' => 'expoInrap',
'controller' => 'Home',
'action' => 'Index'
)
),
"Jeunesse"=> array(
'displayName' => "Exposition jeunesse",
"default" => array(
'module' => 'expoInrap',
'controller' => 'Jeunesse',
'action' => 'Index'
)
),
"Expo" => array(
"displayName" => "Exposition adulte",
"default" => array(
'module' => 'expoInrap',
'controller' => 'Exposition',
'action' => 'Index'
)
),
"Partenaire" => array(
"displayName" => "Exposition partenaire",
"default" => array(
'module' => 'expoInrap',
'controller' => 'Partenaire',
'action' => 'Index'
)
)
)
);
$pa_menu_bar['expo_menu'] =
$default_menu_action
;
}
return $pa_menu_bar;
}
}