本文整理汇总了PHP中PluginEngine::loadPlugins方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginEngine::loadPlugins方法的具体用法?PHP PluginEngine::loadPlugins怎么用?PHP PluginEngine::loadPlugins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginEngine
的用法示例。
在下文中一共展示了PluginEngine::loadPlugins方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: selectSem
// 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);
}
if ($user_did_login) {
NotificationCenter::postNotification('UserDidLogin', $user->id);
}
示例2: auth_loginform
/**
*
*/
function auth_loginform()
{
if (Request::isXhr()) {
if (Request::isDialog()) {
header('X-Location: ' . URLHelper::getURL($_SERVER['REQUEST_URI']));
page_close();
die;
}
throw new AccessDeniedException();
}
// first of all init I18N because seminar_open is not called here...
global $_language_path;
// set up dummy user environment
if ($GLOBALS['user']->id !== 'nobody') {
$GLOBALS['user'] = new Seminar_User('nobody');
$GLOBALS['perm'] = new Seminar_Perm();
$GLOBALS['auth'] = $this;
}
if (!$_SESSION['_language']) {
$_SESSION['_language'] = get_accepted_languages();
}
if (!$_SESSION['_language']) {
$_SESSION['_language'] = $GLOBALS['DEFAULT_LANGUAGE'];
}
// init of output via I18N
$_language_path = init_i18n($_SESSION['_language']);
include 'config.inc.php';
// load the default set of plugins
PluginEngine::loadPlugins();
if (Request::get('loginname') && !$_COOKIE[get_class($GLOBALS['sess'])]) {
$login_template = $GLOBALS['template_factory']->open('nocookies');
} else {
if (isset($this->need_email_activation)) {
$this->unauth();
header('Location: ' . URLHelper::getURL('activate_email.php?cancel_login=1&key=&uid=' . $this->need_email_activation));
page_close();
die;
} else {
unset($_SESSION['semi_logged_in']);
// used by email activation
$login_template = $GLOBALS['template_factory']->open('loginform');
$login_template->set_attribute('loginerror', isset($this->auth["uname"]) && $this->error_msg);
$login_template->set_attribute('error_msg', $this->error_msg);
$login_template->set_attribute('uname', isset($this->auth["uname"]) ? $this->auth["uname"] : Request::username('loginname'));
$login_template->set_attribute('self_registration_activated', $GLOBALS['ENABLE_SELF_REGISTRATION']);
}
}
PageLayout::setHelpKeyword('Basis.AnmeldungLogin');
$header_template = $GLOBALS['template_factory']->open('header');
$header_template->current_page = _('Login');
$header_template->link_params = array('cancel_login' => 1);
include 'lib/include/html_head.inc.php';
echo $header_template->render();
echo $login_template->render();
include 'lib/include/html_end.inc.php';
page_close();
}