本文整理汇总了PHP中Navigation::setActiveImage方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::setActiveImage方法的具体用法?PHP Navigation::setActiveImage怎么用?PHP Navigation::setActiveImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Navigation
的用法示例。
在下文中一共展示了Navigation::setActiveImage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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;
}
}
示例2: 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);
}
示例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: 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);
}
示例5: 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());
}
示例6: 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;
}
}
示例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)
{
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;
}
}
示例10: 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);
}
示例11: 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;
}
}
示例12: getTabNavigation
function getTabNavigation($course_id)
{
if (get_config('SCM_ENABLE')) {
$temp = StudipScmEntry::findByRange_id($course_id, 'ORDER BY position ASC');
$scms = SimpleORMapCollection::createFromArray($temp);
$navigation = new Navigation($scms->first()->tab_name ?: _('Informationen'));
$navigation->setImage(Icon::create('infopage', 'info_alt'));
$navigation->setActiveImage(Icon::create('infopage', 'info'));
foreach ($scms as $scm) {
$scm_link = 'dispatch.php/course/scm/' . $scm->id;
$nav = new Navigation($scm['tab_name'], $scm_link);
$navigation->addSubNavigation($scm->id, $nav);
}
return array('scm' => $navigation);
} else {
return null;
}
}
示例13: 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;
}
}
示例14: setupNavigation
private function setupNavigation()
{
global $perm;
$cid = $this->getContext();
if (Request::isXhr() || Navigation::hasItem('/course/cliqr') || !$this->isActivated($cid) || !$perm->have_studip_perm("tutor", $cid)) {
return;
}
# /course/cliqr -> plugins.php/cliqrplugin/questions
$url = PluginEngine::getURL('cliqrplugin', compact('cid'), 'questions', true);
$navigation = new Navigation(_('Cliqr'), $url);
$navigation->setImage(Assets::image_path('icons/16/white/test.png'));
$navigation->setActiveImage(Assets::image_path('icons/16/black/test.png'));
# /course/cliqr/index -> plugins.php/cliqrplugin/questions#index
$navigation->addSubNavigation("index", new Navigation(_("Fragen"), $url . '#index'));
# /course/cliqr/new -> plugins.php/cliqrplugin/questions#new
$navigation->addSubNavigation("new", new Navigation(_("Frage erstellen"), $url . '#new'));
# /course/cliqr/help -> plugins.php/cliqrplugin/help
$url = PluginEngine::getURL('cliqrplugin', compact('cid'), 'help', true);
$navigation->addSubNavigation("help", new Navigation(_("Methodische Informationen"), $url));
Navigation::addItem('/course/cliqr', $navigation);
}
示例15: getTabNavigation
function getTabNavigation($course_id)
{
if ($GLOBALS['perm']->have_studip_perm('dozent', $course_id)) {
$navigation = new Navigation(_('Verwaltung'));
$navigation->setImage(Icon::create('admin', 'info_alt'));
$navigation->setActiveImage(Icon::create('admin', 'info'));
$navigation->addSubNavigation('main', new Navigation(_('Verwaltung'), 'dispatch.php/course/studygroup/edit/' . $course_id));
$navigation->addSubNavigation('avatar', new Navigation(_('Infobild'), 'dispatch.php/course/avatar/update/' . $course_id));
if (!$GLOBALS['perm']->have_perm('admin')) {
if (get_config('VOTE_ENABLE')) {
$item = new Navigation(_('Umfragen und Tests'), 'admin_vote.php?view=vote_sem');
$item->setDescription(_('Erstellen und bearbeiten Sie einfache Umfragen und Tests.'));
$navigation->addSubNavigation('vote', $item);
$item = new Navigation(_('Evaluationen'), 'admin_evaluation.php?view=eval_sem');
$item->setDescription(_('Richten Sie fragebogenbasierte Umfragen und Lehrevaluationen ein.'));
$navigation->addSubNavigation('evaluation', $item);
}
}
return array('admin' => $navigation);
} else {
return array();
}
}