blob: 3fc03d4275fc3e008895ca43fd3c1f648be98501 (
plain)
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
|
<?php
/*
* OERNavigation.php - navigation for tools page
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* @author Rasmus Fuhse
* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
* @category Stud.IP
* @since 5.0
*/
/**
* This navigation includes the OER Campus in Stud.IP.
*/
class OERNavigation extends Navigation
{
/**
* Initialize a new Navigation instance.
*/
public function __construct()
{
parent::__construct(_('OER Campus'));
$this->setImage(Icon::create('oer-campus', Icon::ROLE_NAVIGATION, ["title" => _('OER Campus')]));
}
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
global $perm;
parent::initSubNavigation();
$navigation = new Navigation(_('OER Campus'), 'dispatch.php/oer/market');
$this->addSubNavigation('market', $navigation);
if ($perm->have_perm('autor')) {
$navigation = new Navigation(_('Meine Materialien'), 'dispatch.php/oer/mymaterial');
$this->addSubNavigation('mymaterial', $navigation);
}
}
}
|