This repository was archived by the owner on Jun 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBootstrap.php
More file actions
93 lines (80 loc) · 2.47 KB
/
Bootstrap.php
File metadata and controls
93 lines (80 loc) · 2.47 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
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
<?php
namespace University;
class Bootstrap extends \Reborn\Module\AbstractBootstrap
{
/**
* This method will run when module boot.
*
* @return void;
*/
public function boot() {}
/**
* Menu item register method for admin panel
*
* @return void
*/
public function adminMenu(\Reborn\Util\Menu $menu, $modUri)
{
$childs = array();
$childs[] = array('title' => 'Universities', 'uri' => '');
$childs[] = array('title' => 'Courses', 'uri' => 'course');
$childs[] = array('title' => 'Categories', 'uri' => 'category');
$childs[] = array('title' => 'Student Sheet', 'uri' => 'studentsheet');
$menu->group($modUri, 'Uni Application', 'icon-college', 20, $childs);
// Create menu for Students and Agents
$menu->add('accounts', 'Accounts', '#', null, 'icon-group', 22);
$menu->add('student', 'Students', $modUri . '/student', 'accounts');
$menu->add('agent', 'Agents', $modUri . '/agent', 'accounts');
}
/**
* Module Toolbar Data for Admin Panel
*
* @return array
*/
public function moduleToolbar()
{
$uri = \Uri::segment(3);
if ( $uri == 'course') {
$mod_toolbar = array(
'addCourse' => array(
'url' => 'university/course/add',
'name' => t('university::course.label.add'),
'info' => t('university::course.label.add'),
'class' => 'add'
)
);
} elseif ( $uri == 'studentsheet') {
$mod_toolbar = array(
'addCourse' => array(
'url' => 'university/studentsheet/add',
'name' => t('university::studentsheet.title.add'),
'info' => t('university::studentsheet.title.add'),
'class' => 'add'
)
);
}else {
$mod_toolbar = array(
'add' => array(
'url' => 'university/add',
'name' => t('university::university.label.add'),
'info' => t('university::university.label.add'),
'class' => 'add'
),
);
}
return $mod_toolbar;
}
/**
* Setting attributes for Module
*
* @return array
*/
public function settings() {}
/**
* Register method for Module.
* This method will call application start.
* You can register at requirement for Reborn CMS.
*
*/
public function register() {}
}