本文整理汇总了PHP中Navigation::addSubNavigation方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::addSubNavigation方法的具体用法?PHP Navigation::addSubNavigation怎么用?PHP Navigation::addSubNavigation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Navigation
的用法示例。
在下文中一共展示了Navigation::addSubNavigation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct();
$top = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array('view' => 'tiles'), "presenting/overview"));
$top->setImage(Icon::create($this->getPluginURL() . "/assets/topicon.svg"));
$overview = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
$top->addSubNavigation("presenting", $overview);
$overview->addSubNavigation("overview", new AutoNavigation(_('Übersicht'), PluginEngine::getURL($this, array(), "presenting/overview")));
$overview->addSubNavigation("all", new AutoNavigation(_('Alle Plugins'), PluginEngine::getURL($this, array(), "presenting/all")));
$overview->addSubNavigation("tools", new AutoNavigation(_('Tools'), PluginEngine::getURL($this, array(), "tools/sidebar_graphics_generator")));
if ($GLOBALS['perm']->have_perm("autor")) {
$top->addSubNavigation("myplugins", new Navigation(_("Meine Plugins"), PluginEngine::getURL($this, array(), "myplugins/overview")));
}
if ($GLOBALS['perm']->have_perm("user")) {
$last_visit = UserConfig::get($GLOBALS['user']->id)->getValue("last_pluginmarket_visit");
if ($last_visit) {
$badge_number = MarketPlugin::countBySql("publiclyvisible = 1 AND approved = 1 AND published > ?", array($last_visit));
if ($badge_number > 0) {
$top->setBadgeNumber($badge_number);
}
}
}
if ($GLOBALS['perm']->have_perm("root")) {
$approving = new Navigation(_("Qualitätssicherung"), PluginEngine::getURL($this, array(), "approving/overview"));
$top->addSubNavigation("approving", $approving);
}
Navigation::addItem("/pluginmarket", $top);
$loginlink = new Navigation($this->getDisplayTitle(), PluginEngine::getURL($this, array(), "presenting/overview"));
$loginlink->setDescription(_("Laden Sie hier Plugins für Ihr Stud.IP herunter"));
Navigation::addItem("/login/pluginmarket", $loginlink);
NotificationCenter::addObserver($this, "triggerFollowingStudips", "PluginReleaseDidUpdateCode");
}
示例2: initSubNavigation
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
parent::initSubNavigation();
// browse courses
$navigation = new Navigation(_('Veranstaltungen'), 'dispatch.php/search/courses');
$navigation->addSubNavigation('all', new Navigation(_('Alle'), 'dispatch.php/search/courses?reset_all=TRUE', array('view' => 'all')));
foreach ($GLOBALS['SEM_CLASS'] as $key => $val) {
$navigation->addSubNavigation($key, new Navigation($val['name'], 'dispatch.php/search/courses?reset_all=TRUE&cmd=qs', array('view' => $key)));
}
$this->addSubNavigation('courses', $navigation);
// search archive
$navigation = new Navigation(_('Archiv'), 'archiv.php');
$this->addSubNavigation('archive', $navigation);
// search users
$navigation = new Navigation(_('Personen'), 'browse.php');
$this->addSubNavigation('users', $navigation);
// browse institutes
$navigation = new Navigation(_('Einrichtungen'), 'institut_browse.php');
$this->addSubNavigation('institutes', $navigation);
// browse resources
if (get_config('RESOURCES_ENABLE')) {
$navigation = new Navigation(_('Ressourcen'), 'resources.php', array('view' => 'search', 'reset' => 'TRUE'));
$this->addSubNavigation('resources', $navigation);
}
}
示例3: initSubNavigation
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
global $perm;
parent::initSubNavigation();
// online list
$navigation = new Navigation(_('Wer ist online?'), 'dispatch.php/online');
$this->addSubNavigation('online', $navigation);
// contacts
$navigation = new Navigation(_('Kontakte'), 'dispatch.php/contact');
$this->addSubNavigation('contacts', $navigation);
// study groups
if (get_config('STUDYGROUPS_ENABLE')) {
$navigation = new Navigation(_('Studiengruppen'));
$navigation->addSubNavigation('browse', new Navigation(_('Studiengruppensuche'), 'dispatch.php/studygroup/browse'));
$navigation->addSubNavigation('new', new Navigation(_('Neue Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1'));
if (Config::get()->MY_COURSES_ENABLE_STUDYGROUPS) {
$navigation->addSubNavigation('index', new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups'));
}
$this->addSubNavigation('studygroups', $navigation);
}
// ranking
if (get_config('SCORE_ENABLE')) {
$navigation = new Navigation(_('Rangliste'), 'dispatch.php/score');
$this->addSubNavigation('score', $navigation);
}
}
示例4: initSubNavigation
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
global $user, $perm;
parent::initSubNavigation();
$sem_create_perm = in_array(get_config('SEM_CREATE_PERM'), array('root', 'admin', 'dozent')) ? get_config('SEM_CREATE_PERM') : 'dozent';
// my courses
if (is_object($user) && $user->id != 'nobody') {
if ($perm->have_perm('admin')) {
$navigation = new Navigation(_('Administration'));
} else {
$navigation = new Navigation(_('Meine Veranstaltungen'));
}
$navigation->addSubNavigation('list', new Navigation($perm->have_perm('admin') ? _('Veranstaltungsadministration') : _('Aktuelle Veranstaltungen'), 'dispatch.php/my_courses'));
if ($perm->have_perm('admin')) {
if ($GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT != 'all') {
$navigation->addSubNavigation('schedule', new Navigation(_('Veranstaltungs-Stundenplan'), 'dispatch.php/calendar/instschedule?cid=' . $GLOBALS['user']->cfg->MY_INSTITUTES_DEFAULT));
}
} else {
$navigation->addSubNavigation('archive', new Navigation(_('Archivierte Veranstaltungen'), 'dispatch.php/my_courses/archive'));
}
$this->addSubNavigation('my_courses', $navigation);
if (Config::get()->MY_COURSES_ENABLE_STUDYGROUPS && !$GLOBALS['perm']->have_perm('admin')) {
$navigation = new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups');
$navigation->addSubNavigation('index', new Navigation(_('Meine Studiengruppen'), 'dispatch.php/my_studygroups'));
$navigation->addSubNavigation('all', new Navigation(_('Studiengruppensuche'), 'dispatch.php/studygroup/browse'));
$navigation->addSubNavigation('new', new Navigation(_('Neue Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1'));
$this->addSubNavigation('my_studygroups', $navigation);
}
if (!$perm->have_perm('admin')) {
$navigation = new Navigation(_('Meine Einrichtungen'), 'dispatch.php/my_institutes');
$this->addSubNavigation('my_institutes', $navigation);
}
}
}
示例5: getTabNavigation
function getTabNavigation($course_id)
{
$navigation = new Navigation(_('Dateien'));
$navigation->setImage(Icon::create('files', 'info_alt'));
$navigation->setActiveImage(Icon::create('files', 'info'));
$navigation->addSubNavigation('tree', new Navigation(_('Ordneransicht'), "folder.php?cmd=tree"));
$navigation->addSubNavigation('all', new Navigation(_('Alle Dateien'), "folder.php?cmd=all"));
return array('files' => $navigation);
}
示例6: initSubNavigation
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
parent::initSubNavigation();
$messages = new Navigation(_('Nachrichten'), 'dispatch.php/messages/overview');
$inbox = new Navigation(_('Eingang'), 'dispatch.php/messages/overview');
$messages->addSubNavigation('inbox', $inbox);
$messages->addSubNavigation('sent', new Navigation(_('Gesendet'), 'dispatch.php/messages/sent'));
$this->addSubNavigation('messages', $messages);
}
示例7: getTabNavigation
function getTabNavigation($course_id)
{
if (get_config('WIKI_ENABLE')) {
$navigation = new Navigation(_('Wiki'));
$navigation->setImage(Icon::create('wiki', 'info_alt'));
$navigation->setActiveImage(Icon::create('wiki', 'info'));
$navigation->addSubNavigation('show', new Navigation(_('WikiWikiWeb'), 'wiki.php?view=show'));
$navigation->addSubNavigation('listnew', new Navigation(_('Neue Seiten'), 'wiki.php?view=listnew'));
$navigation->addSubNavigation('listall', new Navigation(_('Alle Seiten'), 'wiki.php?view=listall'));
return array('wiki' => $navigation);
} else {
return null;
}
}
示例8: getTabNavigation
function getTabNavigation($course_id)
{
// cmd und open_close_id mit durchziehen, damit geöffnete Termine geöffnet bleiben
$req = Request::getInstance();
$openItem = '';
if (isset($req['cmd']) && isset($req['open_close_id'])) {
$openItem = '&cmd=' . $req['cmd'] . '&open_close_id=' . $req['open_close_id'];
}
$navigation = new Navigation(_('Ablaufplan'));
$navigation->setImage(Icon::create('schedule', 'info_alt'));
$navigation->setActiveImage(Icon::create('schedule', 'info'));
$navigation->addSubNavigation('dates', new Navigation(_('Termine'), "dispatch.php/course/dates"));
$navigation->addSubNavigation('topics', new Navigation(_('Themen'), "dispatch.php/course/topics"));
return array('schedule' => $navigation);
}
示例9: getTabNavigation
function getTabNavigation($course_id)
{
#$navigation = new AutoNavigation(_('Teilnehmende'));
$navigation = new Navigation(_('Teilnehmende'));
$navigation->setImage(Icon::create('persons', 'info_alt'));
$navigation->setActiveImage(Icon::create('persons', 'info'));
$navigation->addSubNavigation('view', new Navigation(_('Teilnehmende'), 'dispatch.php/course/members'));
if (Course::find($course_id)->aux_lock_rule) {
$navigation->addSubNavigation('additional', new Navigation(_('Zusatzangaben'), 'dispatch.php/course/members/additional'));
}
$navigation->addSubNavigation('view_groups', new Navigation(_('Funktionen / Gruppen'), 'statusgruppen.php?view=statusgruppe_sem'));
if ($GLOBALS['perm']->have_studip_perm('tutor', $course_id) && !LockRules::check($course_id, 'groups')) {
$navigation->addSubNavigation('edit_groups', new Navigation(_('Funktionen / Gruppen verwalten'), 'admin_statusgruppe.php?new_sem=TRUE&range_id=' . $course_id));
}
return array('members' => $navigation);
}
示例10: getTabNavigation
function getTabNavigation($course_id)
{
if (get_config('RESOURCES_ENABLE') && checkAvailableResources($course_id)) {
$navigation = new Navigation(_('Ressourcen'), 'resources.php?view=openobject_main&view_mode=oobj');
$navigation->setImage(Icon::create('resources', 'info_alt'));
$navigation->setActiveImage(Icon::create('resources', 'info'));
$navigation->addSubNavigation('overview', new Navigation(_('Übersicht'), 'resources.php?view=openobject_main'));
$navigation->addSubNavigation('group_schedule', new Navigation(_('Übersicht Belegung'), 'resources.php?view=openobject_group_schedule'));
$navigation->addSubNavigation('view_details', new Navigation(_('Details'), 'resources.php?view=openobject_details'));
$navigation->addSubNavigation('view_schedule', new Navigation(_('Belegung'), 'resources.php?view=openobject_schedule'));
$navigation->addSubNavigation('edit_assign', new Navigation(_('Belegungen bearbeiten'), 'resources.php?view=openobject_assign'));
return array('resources' => $navigation);
} else {
return null;
}
}
示例11: testNavigation
public function testNavigation()
{
$navigation = new Navigation('test');
$nav1 = new Navigation('foo', NULL);
$nav2 = new Navigation('bar', 'bar.php');
$nav3 = new Navigation('baz', 'baz.php');
$nav4 = new Navigation('egg', 'egg.php');
$this->assertNull($navigation->getURL());
$this->assertEquals(array(), $navigation->getSubNavigation());
$navigation->addSubNavigation('a1', $nav1);
$navigation->addSubNavigation('a2', $nav2);
$navigation->addSubNavigation('a3', $nav3);
$nav2->addSubNavigation('b1', $nav4);
$this->assertFalse($navigation->isActive());
$this->assertEquals('bar.php', $navigation->getURL());
$this->assertEquals(array('a1' => $nav1, 'a2' => $nav2, 'a3' => $nav3), $navigation->getSubNavigation());
$nav4->setActive(true);
$this->assertTrue($navigation->isActive());
$this->assertSame($navigation->activeSubNavigation(), $nav2);
$this->assertSame($nav2->activeSubNavigation(), $nav4);
$navigation->removeSubNavigation('a3');
$navigation->insertSubNavigation('a3', $nav3, 'a2');
$navigation->removeSubNavigation('a1');
$nav2->insertSubNavigation('a1', $nav1, '');
$this->assertEquals('baz.php', $navigation->getURL());
$this->assertEquals(array('a3' => $nav3, 'a2' => $nav2), $navigation->getSubNavigation());
$this->assertEquals(array('b1' => $nav4, 'a1' => $nav1), $nav2->getSubNavigation());
}
示例12: getTabNavigation
function getTabNavigation($course_id)
{
if (get_config('LITERATURE_ENABLE')) {
$object_type = get_object_type($course_id);
$navigation = new Navigation(_('Literatur'));
$navigation->setImage(Icon::create('literature', 'info_alt'));
$navigation->setActiveImage(Icon::create('literature', 'info'));
$navigation->addSubNavigation('view', new Navigation(_('Literatur'), "dispatch.php/course/literature?view=literatur_" . $object_type));
if ($GLOBALS['perm']->have_studip_perm('tutor', $course_id)) {
$navigation->addSubNavigation('edit', new Navigation(_('Literatur bearbeiten'), 'dispatch.php/literature/edit_list?view=literatur_' . $object_type . '&new_' . $object_type . '=TRUE&_range_id=' . $course_id));
$navigation->addSubNavigation('search', new Navigation(_('Literatur suchen'), 'dispatch.php/literature/search?return_range=' . $course_id));
}
return array('literature' => $navigation);
} else {
return null;
}
}
示例13: getTabNavigation
function getTabNavigation($course_id)
{
$object_type = get_object_type($course_id, array('sem', 'inst'));
if ($object_type === 'sem') {
$course = Course::find($course_id);
$sem_class = $GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$course->status]['class']] ?: SemClass::getDefaultSemClass();
} else {
$institute = Institute::find($course_id);
$sem_class = SemClass::getDefaultInstituteClass($institute->type);
}
$navigation = new Navigation(_('Übersicht'));
$navigation->setImage(Icon::create('seminar', 'info_alt'));
$navigation->setActiveImage(Icon::create('seminar', 'info'));
if ($object_type !== 'sem') {
$navigation->addSubNavigation('info', new Navigation(_('Kurzinfo'), 'dispatch.php/institute/overview'));
$navigation->addSubNavigation('courses', new Navigation(_('Veranstaltungen'), 'show_bereich.php?level=s&id=' . $course_id));
$navigation->addSubNavigation('schedule', new Navigation(_('Veranstaltungs-Stundenplan'), 'dispatch.php/calendar/instschedule?cid=' . $course_id));
if ($GLOBALS['perm']->have_studip_perm('admin', $course_id)) {
$navigation->addSubNavigation('admin', new Navigation(_('Administration der Einrichtung'), 'dispatch.php/institute/basicdata/index?new_inst=TRUE'));
}
} else {
$navigation->addSubNavigation('info', new Navigation(_('Kurzinfo'), 'dispatch.php/course/overview'));
if (!$sem_class['studygroup_mode']) {
$navigation->addSubNavigation('details', new Navigation(_('Details'), 'dispatch.php/course/details/'));
}
if (!$course->admission_binding && in_array($GLOBALS['perm']->get_studip_perm($course_id), array('user', 'autor'))) {
$navigation->addSubNavigation('leave', new Navigation(_('Austragen aus der Veranstaltung'), 'dispatch.php/my_courses/decline/' . $course_id . '?cmd=suppose_to_kill'));
}
}
return array('main' => $navigation);
}
示例14: getTabNavigation
function getTabNavigation($course_id)
{
if (get_config('ELEARNING_INTERFACE_ENABLE')) {
$navigation = new Navigation(_('Lernmodule'));
$navigation->setImage(Icon::create('learnmodule', 'info_alt'));
$navigation->setActiveImage(Icon::create('learnmodule', 'info'));
if (ObjectConnections::isConnected($course_id)) {
$elearning_nav = new Navigation(_('Lernmodule dieser Veranstaltung'), 'dispatch.php/course/elearning/show?seminar_id=' . $course_id);
if ($sem_class == 'inst') {
$elearning_nav->setTitle(_('Lernmodule dieser Einrichtung'));
}
$navigation->addSubNavigation('show', $elearning_nav);
}
if ($GLOBALS['perm']->have_studip_perm('tutor', $_SESSION['SessionSeminar'])) {
$navigation->addSubNavigation('edit', new Navigation(_('Lernmodule hinzufügen / entfernen'), 'dispatch.php/course/elearning/edit?seminar_id=' . $course_id));
}
return array('elearning' => $navigation);
} else {
return null;
}
}
示例15: getTabNavigation
public function getTabNavigation($course_id)
{
if (!$this->isActivated($course_id)) {
return;
}
$this->setupAutoload();
$navigation = new Navigation(_('Forum'), PluginEngine::getURL($this, array(), 'index'));
$navigation->setImage(Icon::create('forum', 'info_alt'));
// add main third-level navigation-item
$navigation->addSubNavigation('index', new Navigation(_('Übersicht'), PluginEngine::getURL($this, array(), 'index')));
if (ForumPerm::has('fav_entry', $course_id)) {
$navigation->addSubNavigation('newest', new Navigation(_("Neue Beiträge"), PluginEngine::getURL($this, array(), 'index/newest')));
$navigation->addSubNavigation('latest', new Navigation(_("Letzte Beiträge"), PluginEngine::getURL($this, array(), 'index/latest')));
$navigation->addSubNavigation('favorites', new Navigation(_('Gemerkte Beiträge'), PluginEngine::getURL($this, array(), 'index/favorites')));
// mass-administrate the forum
if (ForumPerm::has('admin', $course_id)) {
$navigation->addSubNavigation('admin', new Navigation(_('Administration'), PluginEngine::getURL($this, array(), 'admin')));
}
}
return array('forum2' => $navigation);
}