-
Notifications
You must be signed in to change notification settings - Fork 1
/
HistoryproxyController.php
52 lines (46 loc) · 1.82 KB
/
HistoryproxyController.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
<?php
/**
* This file is part of the {@link http://ontowiki.net OntoWiki} project.
*
* @copyright Copyright (c) 2013, {@link http://aksw.org AKSW}
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
*/
/**
* Historyproxy component controller. This controler is only used for demonstration purposes of the historyproxy.
*
* @category OntoWiki
* @package Extensions_Historyproxy
* @author Sebastian Nuck
* @copyright Copyright (c) 2014, {@link http://aksw.org AKSW}
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
*/
class HistoryproxyController extends OntoWiki_Controller_Component
{
public function viewAction() {
$this->view->placeholder('main.window.title')->set('Historyproxy');
$this->addModuleContext('main.window.historyproxy.search');
OntoWiki::getInstance()->getNavigation()->disableNavigation();
$model = $this->_owApp->selectedModel;
$event = new Erfurt_Event( 'onQueryHistory' );
// $model->getModelIri()
/**
* Get last imports
*/
$event->function = 'getLastImports';
$event->parameters = array( );
$event->trigger();
$this->view->importsFunction = $event->function;
$this->view->importsParameters = $event->parameters;
$this->view->importsCallback = $event->callback;
/**
* Get last changes
*/
$event->function = 'getChangesFromRange';
$event->parameters = array( $model->getModelIri(),
'01-01-2014' , '30-01-2014');
$event->trigger();
$this->view->changeFunction = $event->function;
$this->view->changeParameters = $event->parameters;
$this->view->changeCallback = $event->callback;
}
}