-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchivesWidget.php
More file actions
61 lines (56 loc) · 1.95 KB
/
archivesWidget.php
File metadata and controls
61 lines (56 loc) · 1.95 KB
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
<?php
/*
* ----------------------------------------------------------------------
* CollectiveAccess Archives widget & plugin
* Created by idéesculture 2018 (www.ideesculture.com)
* ----------------------------------------------------------------------
* CollectiveAccess is a TM by Whirl-i-Gig
* CollectiveAccess and this Archives widget & plugin are under GNU GPL v2 license
*
*/
require_once(__CA_LIB_DIR__.'/ca/BaseWidget.php');
require_once(__CA_LIB_DIR__.'/ca/IWidget.php');
class archivesWidget extends BaseWidget implements IWidget {
# -------------------------------------------------------
private $opo_config;
static $s_widget_settings = array();
# -------------------------------------------------------
public function __construct($ps_widget_path, $pa_settings) {
$this->title = _t('Archives');
$this->description = _t('Arborescence des archives');
parent::__construct($ps_widget_path, $pa_settings);
$this->opo_config = Configuration::load($ps_widget_path.'/conf/archives.conf');
}
# -------------------------------------------------------
/**
* Override checkStatus() to return true
*/
public function checkStatus() {
return array(
'description' => $this->getDescription(),
'errors' => array(),
'warnings' => array(),
'available' => ((bool)$this->opo_config->get('enabled'))
);
}
# -------------------------------------------------------
/**
*
*/
public function renderWidget($ps_widget_id, &$pa_settings) {
parent::renderWidget($ps_widget_id, $pa_settings);
$this->opo_view->setVar("root_type", $this->opo_config->get('root_type'));
return $this->opo_view->render('main_html.php');
}
# -------------------------------------------------------
/**
* Get widget user actions
*/
static public function getRoleActionList() {
return array();
}
# -------------------------------------------------------
}
BaseWidget::$s_widget_settings['linksWidget'] = array(
);
?>