Returns the entries of $sourceroots that the current user has access
to.
public static sourceroots ( ) : array | ||
return | array | The sourceroots that the current user has access to. |
/** * 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'; }
/** */ public function topbarCreate(Horde_Tree_Renderer_Base $tree, $parent = null, array $params = array()) { $sourceroots = Chora::sourceroots(); asort($sourceroots); foreach ($sourceroots as $key => $val) { $tree->addNode(array('id' => $parent . $key, 'parent' => $parent, 'label' => $val['name'], 'expanded' => false, 'params' => array('icon' => Horde_Themes::img('tree/folder.png'), 'url' => Chora::url('browsedir', '', array('rt' => $key))))); } }
/** * Add additional items to the sidebar. * * @param Horde_View_Sidebar $sidebar The sidebar object. */ public function sidebar($sidebar) { foreach (Chora::sourceroots() as $key => $val) { $row = array('selected' => $GLOBALS['sourceroot'] == $key, 'url' => Chora::url('browsedir', '', array('rt' => $key)), 'label' => $val['name'], 'type' => 'radiobox'); $sidebar->addRow($row, 'backends'); } }