当前位置: 首页>>代码示例>>PHP>>正文


PHP PluginEngine::loadPlugins方法代码示例

本文整理汇总了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);
}
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:seminar_open.php

示例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();
 }
开发者ID:ratbird,项目名称:hope,代码行数:60,代码来源:Seminar_Auth.class.php


注:本文中的PluginEngine::loadPlugins方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。