/
IndexLoad.class.php
47 lines (36 loc) · 1.11 KB
/
IndexLoad.class.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
<?php
/**
* NGS demo load for demostration subdomain module structure
* this class extends from AbstractLoad class
*
* this load can called from browser using demosubdomain.*
*
* @author Levon Naghashyan <levon@naghashyan.com>
* @site http://naghashyan.com
* @year 2015
* @version 2.0.0
* @package loads.demomodule.main
* @copyright Naghashyan Solutions LLC
*
*/
namespace admin\loads {
use NGS;
class IndexLoad extends BaseLoad {
public function load() {
}
public function getDefaultLoads() {
$loads = array();
if (NGS()->getSessionManager()->getUserType() == \admin\security\UserGroups::$ADMIN) {
$loads["content"]["action"] = "admin.loads.dashboard.index";
$loads["content"]["args"] = array();
} else {
$loads["content"]["action"] = "admin.loads.passport.index";
$loads["content"]["args"] = array();
}
return $loads;
}
public function getTemplate() {
return NGS()->getTemplateDir() . "/index.tpl";
}
}
}