This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
memberdb/application/classes/URL.php

45 lines
1.1 KiB
PHP
Raw Normal View History

2014-07-09 03:04:56 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class adds committee support
*
* @package Membership Database
* @category Modifications
* @author Deon George
* @copyright (c) 2014 Deon George
* @license http://dev.leenooks.net/license.html
*/
class URL extends lnApp_URL {
// Our method paths for different functions
public static $method_directory = array(
'admin'=>'a',
2014-09-01 13:01:01 +00:00
'director'=>'d',
2014-07-09 03:04:56 +00:00
'committee'=>'c',
'user'=>'u',
);
public static function navbar() {
$result = array();
foreach (array_reverse(self::$method_directory) as $k=>$v)
switch ($k) {
2014-09-29 05:17:37 +00:00
case 'admin': $result[$k] = array('name'=>'Administrator','icon'=>'fa-globe');
2014-07-09 03:04:56 +00:00
break;
2014-09-29 05:17:37 +00:00
case 'director': $result[$k] = array('name'=>'Director','icon'=>'fa-th-list');
2014-09-01 13:01:01 +00:00
break;
2014-09-29 05:17:37 +00:00
case 'committee': $result[$k] = array('name'=>'Committee','icon'=>'fa-th-list');
2014-07-09 03:04:56 +00:00
break;
2014-09-29 05:17:37 +00:00
case 'user': $result[$k] = array('name'=>Auth::instance()->get_user()->name(),'icon'=>'fa-user');
2014-07-09 03:04:56 +00:00
break;
2014-09-29 05:17:37 +00:00
default: $result[$k] = array('name'=>$k,'icon'=>'fa-question-sign');
2014-07-09 03:04:56 +00:00
}
return $result;
}
}
?>