本文整理汇总了PHP中PluginManager::sober方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginManager::sober方法的具体用法?PHP PluginManager::sober怎么用?PHP PluginManager::sober使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginManager
的用法示例。
在下文中一共展示了PluginManager::sober方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
list($GLOBALS['SEM_CLASS'], $GLOBALS['SEM_TYPE']) = array($save_sem_class, $save_sem_type);
// Try to select the course or institute given by the parameter 'cid'
// in the current request. For compatibility reasons there is a fallback to
// the last selected one from the session
$course_id = Request::option('cid', $_SESSION['SessionSeminar']);
// Select the current course or institute if we got one from 'cid' or session.
// This also binds the global $_SESSION['SessionSeminar']
// variable to the URL parameter 'cid' for all generated links.
if (isset($course_id)) {
selectSem($course_id) || selectInst($course_id);
unset($course_id);
}
if (Request::get("sober") && ($GLOBALS['user']->id === "nobody" || $GLOBALS['perm']->have_perm("root"))) {
//deactivate non-core-plugins:
URLHelper::bindLinkParam("sober", $sober);
PluginManager::$sober = true;
}
// load the default set of plugins
PluginEngine::loadPlugins();
// add navigation item: add modules
if ((Navigation::hasItem('/course/admin') || $GLOBALS['perm']->have_perm('admin')) && ($perm->have_studip_perm('tutor', $SessSemName[1]) && $SessSemName['class'] == 'sem') && ($SessSemName['class'] != 'sem' || !$GLOBALS['SEM_CLASS'][$GLOBALS['SEM_TYPE'][$SessSemName['art_num']]['class']]['studygroup_mode'])) {
$plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/course/plus/index');
$plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihre Veranstaltung"));
Navigation::addItem('/course/modules', $plus_nav);
}
// add navigation item for profile: add modules
if (Navigation::hasItem('/profile/edit')) {
$plus_nav = new Navigation(_('Mehr …'), 'dispatch.php/profilemodules/index');
$plus_nav->setDescription(_("Mehr Stud.IP-Funktionen für Ihr Profil"));
Navigation::addItem('/profile/modules', $plus_nav);
}