Conditions | 2 |
Paths | 2 |
Total Lines | 27 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
40 | public static function show($box = false, $layout = '') |
||
41 | { |
||
42 | // Get view object |
||
43 | $loader = \csphere\core\service\Locator::get(); |
||
44 | $view = $loader->load('view'); |
||
45 | |||
46 | // Get user details from session |
||
47 | $session = new \csphere\core\session\Session(); |
||
48 | |||
49 | // Set template content |
||
50 | $data = ['user_name' => $session->get('user_name'), |
||
51 | 'user_id' => $session->get('user_id')]; |
||
52 | |||
53 | // Set template layout |
||
54 | $tpl = 'login' . $layout . '_menu'; |
||
55 | |||
56 | // Box mode needs a different tpl file |
||
57 | if ($box == false) { |
||
58 | |||
59 | $view->template('users', $tpl, $data); |
||
60 | |||
61 | } else { |
||
62 | |||
63 | $view->template('users', "side".$tpl, $data, true); |
||
64 | |||
65 | } |
||
66 | } |
||
67 | } |
||
68 |