本文整理汇总了PHP中Navigation::setImage方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::setImage方法的具体用法?PHP Navigation::setImage怎么用?PHP Navigation::setImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Navigation
的用法示例。
在下文中一共展示了Navigation::setImage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
示例2: __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");
}
示例3: 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;
}
}
示例4: 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;
}
示例5: __construct
public function __construct()
{
parent::__construct();
if ($GLOBALS['perm']->have_perm("autor")) {
$topicon = new Navigation(_("Lernmaterialien"), PluginEngine::getURL($this, array(), "market/overview"));
$topicon->setImage(Icon::create('service', 'navigation'));
Navigation::addItem("/lernmarktplatz", $topicon);
Navigation::addItem("/lernmarktplatz/overview", new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "market/overview")));
Navigation::addItem("/lernmarktplatz/mymaterial", new Navigation(_("Meine Materialien"), PluginEngine::getURL($this, array(), "mymaterial/overview")));
}
if ($GLOBALS['perm']->have_perm("root")) {
$tab = new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "admin/hosts"));
Navigation::addItem("/admin/config/lernmarktplatz", $tab);
}
if (UpdateInformation::isCollecting() && stripos(Request::get("page"), "plugins.php/lernmarktplatz/market/discussion/") !== false) {
$data = Request::getArray("page_info");
$last_update = Request::get("server_timestamp", time() - 30);
$review_id = $data['Lernmarktplatz']['review_id'];
$output = array('comments' => array());
$comments = LernmarktplatzComment::findBySQL("review_id = :review_id AND mkdate >= :last_update ORDER BY mkdate ASC", array('last_update' => $last_update, 'review_id' => $review_id));
$tf = new Flexi_TemplateFactory(__DIR__ . "/views");
foreach ($comments as $comment) {
$template = $tf->open("market/_comment.php");
$template->set_attribute('comment', $comment);
$output['comments'][] = array('comment_id' => $comment->getId(), 'html' => $template->render());
}
UpdateInformation::setInformation("Lernmarktplatz.update", $output);
}
}
示例6: 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);
}
示例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: 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);
}
示例9: testActiveImage
public function testActiveImage()
{
$foo = Icon::create('foo', 'clickable');
$bar = Icon::create('bar', 'clickable');
$navigation = new Navigation('test', 'foo.php');
$navigation->setImage($foo);
$navigation->setActiveImage($bar);
$this->assertEquals($foo, $navigation->getImage());
$navigation->setActive(true);
$this->assertEquals($bar, $navigation->getImage());
}
示例10: getTabNavigation
function getTabNavigation($course_id)
{
if (get_config('CALENDAR_GROUP_ENABLE')) {
$navigation = new Navigation(_('Kalender'), 'dispatch.php/calendar/single/');
$navigation->setImage(Icon::create('schedule', 'info_alt'));
$navigation->setActiveImage(Icon::create('schedule', 'info'));
return array('calendar' => $navigation);
} else {
return null;
}
}
示例11: getPortalTemplate
public function getPortalTemplate()
{
$dispatcher = new StudipDispatcher();
$controller = new Calendar_ContentboxController($dispatcher);
$response = $controller->relay('calendar/contentbox/display/' . $GLOBALS['user']->id);
$template = $GLOBALS['template_factory']->open('shared/string');
$template->content = $response->body;
$navigation = new Navigation('', 'dispatch.php/calendar/single/week');
$navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Neuen Termin anlegen')]));
$template->icons = array($navigation);
return $template;
}
示例12: getPortalTemplate
public function getPortalTemplate()
{
PageLayout::addScript($this->getPluginUrl() . '/js/QuickSelection.js');
$names = WidgetHelper::getWidgetUserConfig($GLOBALS['user']->id, 'QUICK_SELECTION');
$template_factory = new Flexi_TemplateFactory(__DIR__ . '/templates');
$template = $template_factory->open('list');
$template->navigation = $this->getFilteredNavigation($names);
$navigation = new Navigation('', PluginEngine::getLink($this, array(), 'configuration'));
$navigation->setImage(Icon::create('edit', 'clickable', ["title" => _('Konfigurieren')]), array('data-dialog' => 'size=auto'));
$template->icons = array($navigation);
return $template;
}
示例13: getIconNavigation
function getIconNavigation($course_id, $last_visit, $user_id = null)
{
if (!$this->isActivated($course_id)) {
return;
}
$this->setupAutoload();
if ($GLOBALS['perm']->have_studip_perm('user', $course_id)) {
$num_entries = ForumVisit::getCount($course_id, ForumVisit::getVisit($course_id));
$text = ForumHelpers::getVisitText($num_entries, $course_id);
} else {
$num_entries = 0;
$text = 'Forum';
}
$navigation = new Navigation('forum', PluginEngine::getURL($this, array(), 'index/enter_seminar'));
$navigation->setBadgeNumber($num_entries);
if ($num_entries > 0) {
$navigation->setImage(Icon::create('forum+new', 'attention', ["title" => $text]));
} else {
$navigation->setImage(Icon::create('forum', 'inactive', ["title" => $text]));
}
return $navigation;
}
示例14: 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;
}
}
示例15: 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);
}