Chora::sourceroots PHP Méthode

sourceroots() public static méthode

Returns the entries of $sourceroots that the current user has access to.
public static sourceroots ( ) : array
Résultat array The sourceroots that the current user has access to.
    public static function sourceroots()
    {
        $arr = array();
        foreach ($GLOBALS['sourceroots'] as $key => $val) {
            if (empty($val['disabled']) && self::checkPerms($key)) {
                $arr[$key] = $val;
            }
        }
        return $arr;
    }

Usage Example

Exemple #1
0
 /**
  * Generates and prints the page header.
  *
  * @param string $title  The page title.
  */
 public static function header($title)
 {
     global $notification, $page_output;
     if (count(Chora::sourceroots()) < 2) {
         $page_output->sidebar = false;
     }
     $page_output->header(array('title' => $title));
     $notification->notify(array('listeners' => 'status'));
     require CHORA_TEMPLATES . '/headerbar.inc';
 }
All Usage Examples Of Chora::sourceroots