本文整理汇总了PHP中Navigation类的典型用法代码示例。如果您正苦于以下问题:PHP Navigation类的具体用法?PHP Navigation怎么用?PHP Navigation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Navigation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getTabNavigation
function getTabNavigation($course_id)
{
$navigation = new Navigation(_('Teilnehmende'), "dispatch.php/course/studygroup/members/" . $course_id);
$navigation->setImage(Icon::create('persons', 'info_alt'));
$navigation->setActiveImage(Icon::create('persons', 'info'));
return array('members' => $navigation);
}
示例2: __construct
function __construct()
{
global $url;
$this->view = new View();
$nav = new Navigation();
$this->view->globalNav = $nav->renderNav();
}
示例3: 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);
}
示例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: 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);
}
}
示例6: generate
/**
* generate
* @return void
*/
public function generate()
{
$this->core->logger->debug('massiveart->website->sitemap->generate()');
$objRootLevels = $this->getModelFolders()->loadAllRootLevels($this->core->sysConfig->modules->cms);
if (count($objRootLevels) > 0) {
foreach ($objRootLevels as $objRootLevel) {
$objRootLevelLanguages = $this->getModelFolders()->loadRootLevelLanguages($objRootLevel->id);
$strUrl = $this->getModelFolders()->getRootLevelMainUrl($objRootLevel->id, $this->core->sysConfig->environments->production);
if ($strUrl != '') {
$arrUrlParts = explode('.', $strUrl);
if (count($arrUrlParts) == 2) {
$strUrl = str_replace('http://', 'http://www.', $strUrl);
}
// init sitempa xml
$this->initXml($strUrl);
foreach ($objRootLevelLanguages as $objRootLevelLanguage) {
$objNavigation = new Navigation();
$objNavigation->setRootLevelId($objRootLevel->id);
$objNavigation->setLanguageId($objRootLevelLanguage->id);
$this->addXmlUrlsetChilds($objNavigation->loadSitemap(), $strUrl, strtolower($objRootLevelLanguage->languageCode));
}
// svae xml now
$this->saveXml();
}
}
}
}
示例7: __construct
public function __construct()
{
parent::__construct();
$nav = new Navigation(_("Downloads"), PluginEngine::getURL($this, array(), "downloadarea/overview"));
$nav->setImage(Icon::create("download", "navigation"));
Navigation::addItem("/downloader", $nav);
}
示例8: executeList
/**
* Executes list action
*
* @param sfWebRequest $request A request object
*/
public function executeList(sfWebRequest $request)
{
$this->list = array();
$types = Doctrine::getTable('Navigation')->getTypesByAppName($request->getParameter('app', 'pc'));
foreach ($types as $type) {
$navs = Doctrine::getTable('Navigation')->retrieveByType($type);
foreach ($navs as $nav) {
$this->list[$type][] = new NavigationForm($nav);
}
$nav = new Navigation();
$nav->setType($type);
$this->list[$type][] = new NavigationForm($nav);
}
if ($request->isMethod('post')) {
$params = $request->getParameter('nav');
$type = $params['type'];
$count = count($this->list[$type]);
if ($params['id']) {
for ($i = 0; $i < $count - 1; $i++) {
if ($params['id'] === $this->list[$type][$i]->getObject()->id) {
$this->list[$type][$i]->bind($params);
break;
}
}
} else {
$this->list[$type][$count - 1]->bind($params);
}
}
}
示例9: getTabNavigation
function getTabNavigation($course_id)
{
if (TRUE) {
$temp = ScmTabEntry::findByRange_id($course_id, 'ORDER BY position ASC');
if ($temp) {
$scms = SimpleORMapCollection::createFromArray($temp);
$navigation = new Navigation($scms->first()->tab_name ?: _('Informationen'));
$navigation->setImage('icons/16/white/infopage.png');
$navigation->setActiveImage('icons/16/black/infopage.png');
foreach ($scms as $scm) {
$scm_link = PluginEngine::getLink($this, array(), 'show/' . $scm->id);
$nav = new Navigation($scm['tab_name'], $scm_link);
$nav->setImage('icons/16/white/infopage.png');
$nav->setActiveImage('icons/16/black/infopage.png');
Navigation::addItem('course/scmTabs' . $scm->id, $nav);
}
return null;
//array('scm' => $navigation);
} else {
$scm = new ScmTabEntry($id);
$scm->tab_name = 'Infoseite';
$scm->user_id = $GLOBALS['user']->id;
$scm->range_id = $GLOBALS['SessSemName'][1];
$scm->store();
$scm_link = PluginEngine::getLink($this, array(), 'show/' . $scm->id);
$nav = new Navigation($scm->tab_name, $scm_link);
$nav->setImage('icons/16/white/infopage.png');
$nav->setActiveImage('icons/16/black/infopage.png');
Navigation::addItem('course/scmTabs' . $scm->id, $nav);
return null;
}
} else {
return null;
}
}
示例10: __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");
}
示例11: 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);
}
}
示例12: getPortalTemplate
function getPortalTemplate()
{
$dispatcher = new StudipDispatcher();
$controller = new NewsController($dispatcher);
$response = $controller->relay('news/display/studip');
$template = $GLOBALS['template_factory']->open('shared/string');
$template->content = $response->body;
if (StudipNews::CountUnread() > 0) {
$navigation = new Navigation('', PluginEngine::getLink($this, array(), 'read_all'));
$navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')]));
$icons[] = $navigation;
}
if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
if ($rss_id = StudipNews::GetRssIdFromRangeId('studip')) {
$navigation = new Navigation('', 'rss.php', array('id' => $rss_id));
$navigation->setImage(Icon::create('rss', 'clickable', ["title" => _('RSS-Feed')]));
$icons[] = $navigation;
}
}
if ($GLOBALS['perm']->have_perm('root')) {
$navigation = new Navigation('', 'dispatch.php/news/edit_news/new/studip');
$navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Ankündigungen bearbeiten')]), ["rel" => 'get_dialog']);
$icons[] = $navigation;
if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
$navigation = new Navigation('', 'dispatch.php/news/rss_config/studip');
$navigation->setImage(Icon::create('rss+add', 'clickable', ["title" => _('RSS-Feed konfigurieren')]), ["data-dialog" => 'size=auto']);
$icons[] = $navigation;
}
}
$template->icons = $icons;
return $template;
}
示例13: 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();
$navigation = new Navigation(_('Login'), 'index.php?again=yes');
$navigation->setDescription(_('für registrierte NutzerInnen'));
$this->addSubNavigation('login', $navigation);
if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) {
$navigation = new Navigation(_('Login'), 'index.php?again=yes&sso=cas');
$navigation->setDescription(_('für Single Sign On mit CAS'));
$this->addSubNavigation('login_cas', $navigation);
}
if (in_array('Shib', $GLOBALS['STUDIP_AUTH_PLUGIN'])) {
$navigation = new Navigation(_('Shibboleth Login'), 'index.php?again=yes&sso=shib');
$navigation->setDescription(_('für Single Sign On mit Shibboleth'));
$this->addSubNavigation('login_shib', $navigation);
}
if (get_config('ENABLE_SELF_REGISTRATION')) {
$navigation = new Navigation(_('Registrieren'), 'register1.php');
$navigation->setDescription(_('um NutzerIn zu werden'));
$this->addSubNavigation('register', $navigation);
}
if (Config::get()->ENABLE_FREE_ACCESS) {
$navigation = new Navigation(_('Freier Zugang'), 'dispatch.php/public_courses');
$navigation->setDescription(_('ohne Registrierung'));
$this->addSubNavigation('browse', $navigation);
}
$navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines'));
$navigation->setDescription(_('zu Bedienung und Funktionsumfang'));
$this->addSubNavigation('help', $navigation);
}
示例14: setUp
public function setUp()
{
$this->updater = $this->getMock('Magento\\Setup\\Model\\Updater', [], [], '', false);
$this->objectManagerProvider = $this->getMock('\\Magento\\Setup\\Model\\ObjectManagerProvider', [], [], '', false);
$this->filesystem = $this->getMock('Magento\\Framework\\Filesystem', [], [], '', false);
$this->navigation = $this->getMock('Magento\\Setup\\Model\\Navigation', [], [], '', false);
$this->model = new UpdaterTaskCreator($this->filesystem, $this->navigation, $this->updater, $this->objectManagerProvider);
$this->navigation->expects($this->any())->method('getMenuItems')->willReturn([['title' => 'A', 'type' => 'update'], ['title' => 'B', 'type' => 'upgrade'], ['title' => 'C', 'type' => 'enable'], ['title' => 'D', 'type' => 'disable']]);
}
示例15: 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);
}