-
Notifications
You must be signed in to change notification settings - Fork 1
/
FilesHelper.php
32 lines (31 loc) · 1.12 KB
/
FilesHelper.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
<?php
/**
* This file is part of the {@link http://ontowiki.net OntoWiki} project.
*
* @copyright Copyright (c) 2011, {@link http://aksw.org AKSW}
* @license http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
*/
/**
* Helper for the OntoWiki Files Extension
*
* @category OntoWiki
* @package OntoWiki_extensions_files
* @author Sebastian Tramp <[email protected]>
* @author Christoph Rieß <[email protected]>
* @author Norman Heino <[email protected]>
*/
class FilesHelper extends OntoWiki_Component_Helper
{
public function __construct()
{
$owApp = OntoWiki::getInstance();
// if a model has been selected
if ($owApp->selectedModel != null) {
// register with extras menu
$translate = $owApp->translate;
$url = new OntoWiki_Url(array('controller' => 'files', 'action' => 'manage'));
$extrasMenu = OntoWiki_Menu_Registry::getInstance()->getMenu('application')->getSubMenu('Extras');
$extrasMenu->setEntry($translate->_('File Manager'), (string) $url);
}
}
}