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


PHP PluginEngine::getPlugin方法代码示例

本文整理汇总了PHP中PluginEngine::getPlugin方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginEngine::getPlugin方法的具体用法?PHP PluginEngine::getPlugin怎么用?PHP PluginEngine::getPlugin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PluginEngine的用法示例。


在下文中一共展示了PluginEngine::getPlugin方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: startpage_redirect

function startpage_redirect($page_code)
{
    switch ($page_code) {
        case 1:
        case 2:
            $jump_page = "dispatch.php/my_courses";
            break;
        case 3:
            $jump_page = "dispatch.php/calendar/schedule";
            break;
        case 4:
            $jump_page = "dispatch.php/contact";
            break;
        case 5:
            $jump_page = "dispatch.php/calendar/single";
            break;
        case 6:
            // redirect to global blubberstream
            // or no redirection if blubber isn't active
            if (PluginEngine::getPlugin("Blubber")) {
                $jump_page = "plugins.php/blubber/streams/global";
            }
            break;
    }
    page_close();
    header("location: {$jump_page}");
    exit;
}
开发者ID:ratbird,项目名称:hope,代码行数:28,代码来源:seminar_open.php

示例2: StudipSemTreeViewAdmin

 /**
 * constructor
 *
 * @access public
 */
 function StudipSemTreeViewAdmin($start_item_id = "root"){
     $this->start_item_id = ($start_item_id) ? $start_item_id : "root";
     $this->root_content = $GLOBALS['UNI_INFO'];
     parent::TreeView("StudipSemTree"); //calling the baseclass constructor
     $this->studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement');
     URLHelper::bindLinkParam("_marked_item", $this->marked_item);
     $this->marked_sem =& $_SESSION['_marked_sem'];
     $this->parseCommand();
 }
开发者ID:ratbird,项目名称:hope,代码行数:14,代码来源:StudipSemTreeViewAdmin.class.php

示例3: StudipSemTreeViewSimple

 /**
  * constructor
  *
  * @access public
  */
 function StudipSemTreeViewSimple($start_item_id = "root", $sem_number = false, $sem_status, $visible_only = false)
 {
     $this->start_item_id = $start_item_id ? $start_item_id : "root";
     $this->root_content = $GLOBALS['UNI_INFO'];
     $args = null;
     if ($sem_number !== false) {
         $args['sem_number'] = $sem_number;
     }
     if ($sem_status !== false) {
         $args['sem_status'] = $sem_status;
     }
     $args['visible_only'] = $visible_only;
     $this->tree = TreeAbstract::GetInstance("StudipSemTree", $args);
     $this->tree->enable_lonely_sem = false;
     if (!$this->tree->tree_data[$this->start_item_id]) {
         $this->start_item_id = "root";
     }
     $this->studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement');
 }
开发者ID:ratbird,项目名称:hope,代码行数:24,代码来源:StudipSemTreeViewSimple.class.php

示例4: index_action

 public function index_action()
 {
     $this->prelim_discussion = vorbesprechung($this->course->id);
     $this->title = $this->course->getFullname();
     $this->course_domains = UserDomain::getUserDomainsForSeminar($this->course->id);
     $this->sem = new Seminar($this->course);
     if ($studienmodulmanagement = PluginEngine::getPlugin('StudienmodulManagement')) {
         foreach ($this->course->study_areas->filter(function ($m) {
             return $m->isModule();
         }) as $module) {
             $this->studymodules[] = array('nav' => $studienmodulmanagement->getModuleInfoNavigation($module->id, $this->course->start_semester->id), 'title' => $studienmodulmanagement->getModuleTitle($module->id, $this->course->start_semester->id));
         }
     }
     // Retrive display of sem_tree
     if (Config::get()->COURSE_SEM_TREE_DISPLAY) {
         $this->studyAreaTree = StudipStudyArea::backwards($this->course->study_areas);
     } else {
         $this->study_areas = $this->course->study_areas->filter(function ($m) {
             return !$m->isModule();
         });
     }
     if (Request::isXhr()) {
         $this->set_layout(null);
         $this->response->add_header('Content-Type', 'text/html;charset=Windows-1252');
         header('X-Title: ' . $this->title);
     } else {
         PageLayout::setHelpKeyword("Basis.InVeranstaltungDetails");
         PageLayout::setTitle($this->title . " - " . _("Details"));
         PageLayout::addSqueezePackage('admission');
         PageLayout::addSqueezePackage('enrolment');
         if ($GLOBALS['SessionSeminar'] == $this->course->id) {
             Navigation::activateItem('/course/main/details');
             SkipLinks::addIndex(Navigation::getItem('/course/main/details')->getTitle(), 'main_content', 100);
         } else {
             $sidebarlink = true;
             $enrolment_info = $this->sem->getEnrolmentInfo($GLOBALS['user']->id);
         }
         $sidebar = Sidebar::Get();
         if ($sidebarlink) {
             $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id));
         }
         $sidebar->setTitle(_('Details'));
         $links = new ActionsWidget();
         $links->addLink(_("Drucken"), URLHelper::getScriptLink("dispatch.php/course/details/index/" . $this->course->id), Icon::create('print', 'clickable'), array('class' => 'print_action', 'target' => '_blank'));
         if ($enrolment_info['enrolment_allowed'] && $sidebarlink) {
             if (in_array($enrolment_info['cause'], words('member root courseadmin'))) {
                 $abo_msg = _("direkt zur Veranstaltung");
             } else {
                 $abo_msg = _("Zugang zur Veranstaltung");
             }
             $links->addLink($abo_msg, URLHelper::getScriptLink("dispatch.php/course/enrolment/apply/" . $this->course->id), Icon::create('door-enter', 'clickable'), array('data-dialog' => ''));
         }
         if (Config::get()->SCHEDULE_ENABLE && !$GLOBALS['perm']->have_studip_perm("user", $this->course->id) && !$GLOBALS['perm']->have_perm('admin') && $this->sem->getMetaDateCount()) {
             $query = "SELECT COUNT(*) FROM schedule_seminare WHERE seminar_id = ? AND user_id = ?";
             if (!DBManager::Get()->fetchColumn($query, array($this->course->id, $GLOBALS['user']->id))) {
                 $links->addLink(_("Nur im Stundenplan vormerken"), URLHelper::getLink("dispatch.php/calendar/schedule/addvirtual/" . $this->course->id), Icon::create('info', 'clickable'));
             }
         }
         if ($this->send_from_search_page) {
             $links->addLink(_("Zurück zur letzten Auswahl"), URLHelper::getLink($this->send_from_search_page), Icon::create('link-intern', 'clickable'));
         }
         if ($links->hasElements()) {
             $sidebar->addWidget($links);
         }
         $sidebar->setImage('sidebar/seminar-sidebar.png');
         $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id));
         $sidebar = Sidebar::Get();
         $sidebar->setImage('sidebar/seminar-sidebar.png');
         $sidebar->setContextAvatar(CourseAvatar::getAvatar($this->course->id));
         if ($enrolment_info['description']) {
             PageLayout::postMessage(MessageBox::info($enrolment_info['description']));
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:74,代码来源:details.php

示例5: deleteContent

 private function deleteContent($plugmodlist)
 {
     $name = Request::Get('name');
     foreach ($plugmodlist as $key => $val) {
         if (array_key_exists($name, $val)) {
             if ($val[$name]['type'] == 'plugin') {
                 $class = PluginEngine::getPlugin(get_class($val[$name]['object']));
                 $displayname = $class->getPluginName();
             } elseif ($val[$name]['type'] == 'modul') {
                 if ($this->sem_class) {
                     $class = $this->sem_class->getModule($this->sem_class->getSlotModule($val[$name]['modulkey']));
                     $displayname = $val[$name]['object']['name'];
                 }
             }
         }
     }
     if (Request::submitted('check')) {
         if (method_exists($class, 'deleteContent')) {
             $class->deleteContent();
         } else {
             PageLayout::postMessage(MessageBox::info(_("Das Plugin/Modul enthält keine Funktion zum Löschen der Inhalte.")));
         }
     } else {
         PageLayout::postMessage(MessageBox::info(sprintf(_("Sie beabsichtigen die Inhalte von %s zu löschen."), $displayname) . "<br>" . _("Wollen Sie die Inhalte wirklich löschen?") . "<br>" . LinkButton::createAccept(_('Ja'), URLHelper::getURL("?deleteContent=true&check=true&name=" . $name)) . LinkButton::createCancel(_('Nein'))));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:26,代码来源:profilemodules.php

示例6: getModule

 /**
  * returns an instance of the module of a given slotname or pluginclassname
  * @param string $slot_or_plugin
  * @return StudipModule | null
  */
 public function getModule($slot_or_plugin)
 {
     $module = $this->getSlotModule($slot_or_plugin);
     if ($module && $this->isModuleAllowed($module)) {
         if (in_array($module, self::$core_modules)) {
             return new $module();
         }
         if ($module) {
             return PluginEngine::getPlugin($module);
         }
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:17,代码来源:SemClass.class.php

示例7: page_open

 */
require '../lib/bootstrap.php';
# set base url for URLHelper class
URLHelper::setBaseUrl($CANONICAL_RELATIVE_PATH_STUDIP);
# initialize Stud.IP-Session
page_open(array('sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User'));
try {
    require_once 'lib/seminar_open.php';
    # get plugin class from request
    $dispatch_to = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '';
    list($plugin_class, $unconsumed) = PluginEngine::routeRequest($dispatch_to);
    # retrieve corresponding plugin info
    $plugin_manager = PluginManager::getInstance();
    $plugin_info = $plugin_manager->getPluginInfo($plugin_class);
    # create an instance of the queried plugin
    $plugin = PluginEngine::getPlugin($plugin_class);
    # user is not permitted, show login screen
    if (is_null($plugin)) {
        # TODO (mlunzena) should not getPlugin throw this exception?
        throw new AccessDeniedException(_('Sie besitzen keine Rechte zum Aufruf dieses Plugins.'));
    }
    // set default page title
    PageLayout::setTitle($plugin->getPluginName());
    if (is_callable(array($plugin, 'initialize'))) {
        $plugin->initialize();
    }
    # let the show begin
    $plugin->perform($unconsumed);
} catch (AccessDeniedException $ade) {
    global $auth;
    $auth->login_if($auth->auth["uid"] == "nobody");
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:plugins.php

示例8: getModuleInfoHTML

 /**
  * returns a HTML snippet for the info icon if this study area is a module
  * and if there is a compatible plugin available
  *
  * @param string $semester_id
  * @return string
  */
 function getModuleInfoHTML($semester_id = '')
 {
     $ret = '';
     if ($this->isModule() && ($plugin = PluginEngine::getPlugin('StudienmodulManagement'))) {
         $nav = $plugin->getModuleInfoNavigation($this->getID(), $semester_id);
         if ($nav->isVisible(true)) {
             $ret = '<a class="module-info" href="' . URLHelper::getLink($nav->getURL()) . '">';
             $ret .= $nav->getImage()->asImg($nav->getLinkAttributes);
             $ret .= '<span>' . htmlready($nav->getTitle()) . '</span>';
             $ret .= '</a>';
         }
     }
     return $ret;
 }
开发者ID:ratbird,项目名称:hope,代码行数:21,代码来源:StudipStudyArea.class.php


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