本文整理汇总了PHP中PluginEngine类的典型用法代码示例。如果您正苦于以下问题:PHP PluginEngine类的具体用法?PHP PluginEngine怎么用?PHP PluginEngine使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PluginEngine类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:anantace,项目名称:SCMTabs,代码行数:35,代码来源:SCMPlugin.php
示例2: perform
public function perform($unconsumed_path)
{
//$this->setupAutoload();
$dispatcher = new Trails_Dispatcher($this->getPluginPath(), rtrim(PluginEngine::getLink($this, array(), null), '/'), 'show');
$dispatcher->plugin = $this;
$dispatcher->dispatch($unconsumed_path);
}
开发者ID:anantace,项目名称:SeminarTabs,代码行数:7,代码来源:SeminarTabs.php
示例3: perform
function perform($unconsumed_path)
{
$trails_root = $this->getPluginPath() . "/app";
$dispatcher = new Trails_Dispatcher($trails_root, rtrim(PluginEngine::getURL($this, null, ''), '/'), self::DEFAULT_CONTROLLER);
$dispatcher->plugin = $this;
$dispatcher->dispatch($unconsumed_path);
}
开发者ID:swindhab,项目名称:CliqrPlugin,代码行数:7,代码来源:CliqrPlugin.php
示例4: __construct
public function __construct()
{
parent::__construct();
$nav = new Navigation(_("Downloads"), PluginEngine::getURL($this, array(), "downloadarea/overview"));
$nav->setImage(Icon::create("download", "navigation"));
Navigation::addItem("/downloader", $nav);
}
开发者ID:studip,项目名称:StudipDownloader,代码行数:7,代码来源:StudipDownloader.php
示例5: 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
示例6: getPortalTemplate
function getPortalTemplate()
{
$dispatcher = new StudipDispatcher();
$controller = new NewsController($dispatcher);
$response = $controller->relay('news/display/studip');
$template = $GLOBALS['template_factory']->open('shared/string');
$template->content = $response->body;
if (StudipNews::CountUnread() > 0) {
$navigation = new Navigation('', PluginEngine::getLink($this, array(), 'read_all'));
$navigation->setImage(Icon::create('refresh', 'clickable', ["title" => _('Alle als gelesen markieren')]));
$icons[] = $navigation;
}
if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
if ($rss_id = StudipNews::GetRssIdFromRangeId('studip')) {
$navigation = new Navigation('', 'rss.php', array('id' => $rss_id));
$navigation->setImage(Icon::create('rss', 'clickable', ["title" => _('RSS-Feed')]));
$icons[] = $navigation;
}
}
if ($GLOBALS['perm']->have_perm('root')) {
$navigation = new Navigation('', 'dispatch.php/news/edit_news/new/studip');
$navigation->setImage(Icon::create('add', 'clickable', ["title" => _('Ankündigungen bearbeiten')]), ["rel" => 'get_dialog']);
$icons[] = $navigation;
if (get_config('NEWS_RSS_EXPORT_ENABLE')) {
$navigation = new Navigation('', 'dispatch.php/news/rss_config/studip');
$navigation->setImage(Icon::create('rss+add', 'clickable', ["title" => _('RSS-Feed konfigurieren')]), ["data-dialog" => 'size=auto']);
$icons[] = $navigation;
}
}
$template->icons = $icons;
return $template;
}
开发者ID:ratbird,项目名称:hope,代码行数:32,代码来源:NewsWidget.php
示例7: __construct
public function __construct()
{
parent::__construct();
if ($GLOBALS['perm']->have_perm("autor")) {
$topicon = new Navigation(_("Lernmaterialien"), PluginEngine::getURL($this, array(), "market/overview"));
$topicon->setImage(Icon::create('service', 'navigation'));
Navigation::addItem("/lernmarktplatz", $topicon);
Navigation::addItem("/lernmarktplatz/overview", new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "market/overview")));
Navigation::addItem("/lernmarktplatz/mymaterial", new Navigation(_("Meine Materialien"), PluginEngine::getURL($this, array(), "mymaterial/overview")));
}
if ($GLOBALS['perm']->have_perm("root")) {
$tab = new Navigation(_("Lernmarktplatz"), PluginEngine::getURL($this, array(), "admin/hosts"));
Navigation::addItem("/admin/config/lernmarktplatz", $tab);
}
if (UpdateInformation::isCollecting() && stripos(Request::get("page"), "plugins.php/lernmarktplatz/market/discussion/") !== false) {
$data = Request::getArray("page_info");
$last_update = Request::get("server_timestamp", time() - 30);
$review_id = $data['Lernmarktplatz']['review_id'];
$output = array('comments' => array());
$comments = LernmarktplatzComment::findBySQL("review_id = :review_id AND mkdate >= :last_update ORDER BY mkdate ASC", array('last_update' => $last_update, 'review_id' => $review_id));
$tf = new Flexi_TemplateFactory(__DIR__ . "/views");
foreach ($comments as $comment) {
$template = $tf->open("market/_comment.php");
$template->set_attribute('comment', $comment);
$output['comments'][] = array('comment_id' => $comment->getId(), 'html' => $template->render());
}
UpdateInformation::setInformation("Lernmarktplatz.update", $output);
}
}
开发者ID:Krassmus,项目名称:LehrMarktplatz,代码行数:29,代码来源:LernMarktplatz.class.php
示例8: link_for
function link_for($to = '', $params = array())
{
if ($to === '') {
$to = substr(strtolower(get_class($this)), 0, -10) . '/' . $this->current_action;
}
return PluginEngine::getLink($this->plugin, $params, $to);
}
开发者ID:noackorama,项目名称:source-talk-2012,代码行数:7,代码来源:application.php
示例9: __construct
public function __construct()
{
parent::__construct();
if (false) {
//Suche ersetzen
if (Navigation::hasItem("/search")) {
$nav = Navigation::getItem("/search");
$nav->setURL(PluginEngine::getURL($this, array(), "search"));
foreach ($nav->getSubNavigation() as $name => $nav_object) {
$nav->removeSubNavigation($name);
}
$tab = new AutoNavigation(_("Suche"), PluginEngine::getURL($this, array(), "search"));
$nav->addSubNavigation('search', $tab);
}
} else {
//Suche erweitern
if (Navigation::hasItem("/search")) {
$nav = Navigation::getItem("/search");
$nav->setURL(PluginEngine::getURL($this, array(), "search"));
$tab = new AutoNavigation(_("Suche"), PluginEngine::getURL($this, array(), "search"));
$nav->addSubNavigation('search', $tab);
}
}
//Observer definieren:
NotificationCenter::addObserver($this, "show_user_avatar", "WillDisplaySearchResultItem");
NotificationCenter::addObserver($this, "show_seminar_avatar", "WillDisplaySearchResultItem");
NotificationCenter::addObserver($this, "show_document_avatar", "WillDisplaySearchResultItem");
NotificationCenter::addObserver($this, "add_calculator", "LastAlteringOfSearchResults");
NotificationCenter::addObserver($this, "filter_study_areas", "GlobalSearchFilter");
}
开发者ID:noackorama,项目名称:GlobalSearchPlugin,代码行数:30,代码来源:GlobalSearchPlugin.class.php
示例10: __construct
public function __construct()
{
parent::__construct();
if ($GLOBALS['perm']->have_perm("root")) {
$processes = FleximportProcess::findBySQL("1=1 ORDER BY name ASC");
$navigation = new Navigation($this->getDisplayName());
$navigation->setURL(PluginEngine::getURL($this, array(), 'import/overview' . (count($processes) ? "/" . $processes[0]['process_id'] : "")));
Navigation::addItem('/start/fleximport', $navigation);
Navigation::addItem('/fleximport', $navigation);
if (count($processes)) {
foreach ($processes as $process) {
$navigation = new Navigation($process['name'], PluginEngine::getURL($this, array(), 'import/overview/' . $process->getId()));
Navigation::addItem('/fleximport/process_' . $process->getId(), $navigation);
}
} else {
$navigation = new Navigation(_("Import"), PluginEngine::getURL($this, array(), 'import/overview'));
Navigation::addItem('/fleximport/overview', $navigation);
}
$navigation = new Navigation(_("Konfiguration"), PluginEngine::getURL($this, array(), 'config/overview'));
Navigation::addItem('/fleximport/config', $navigation);
if (FleximportConfig::get("DISPLAY_AT_HEADER")) {
if (is_numeric(FleximportConfig::get("DISPLAY_AT_HEADER"))) {
Navigation::getItem('/fleximport')->setImage(version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create("install", "navigation") : Assets::image_path("icons/lightblue/install.svg"));
} else {
Navigation::getItem('/fleximport')->setImage(version_compare($GLOBALS['SOFTWARE_VERSION'], "3.4", ">=") ? Icon::create(FleximportConfig::get("DISPLAY_AT_HEADER"), "navigation") : FleximportConfig::get("DISPLAY_AT_HEADER"));
}
}
}
}
开发者ID:Krassmus,项目名称:Fleximport,代码行数:29,代码来源:Fleximport.class.php
示例11: initialize
public function initialize()
{
PageLayout::addSqueezePackage('lightbox');
$this->addStylesheet('assets/pluginmarket.less');
PageLayout::addHeadElement('link', array('rel' => 'alternate', 'type' => 'application/rss+xml', 'href' => PluginEngine::getLink($this, array(), 'rss/newest'), 'title' => _('Neueste Plugins')));
$sidebar = Sidebar::Get();
$sidebar->setImage('../../' . $this->getPluginPath() . '/assets/sidebar-marketplace.png');
}
开发者ID:studip,项目名称:PluginMarket,代码行数:8,代码来源:PluginMarket.class.php
示例12: __construct
function __construct()
{
parent::__construct();
if (is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('admin')) {
$navigation = new Navigation(_("Veranstaltungs-Vervielfältiger"), PluginEngine::getUrl($this, array(), 'index'));
Navigation::insertItem('/start/replicator', $navigation, 'search');
}
}
开发者ID:noackorama,项目名称:SeminarReplicator,代码行数:8,代码来源:SeminarReplicator.php
示例13: __construct
public function __construct()
{
parent::__construct();
if ($GLOBALS['perm']->have_perm("root")) {
$nav = new Navigation(_("Datenbank"), PluginEngine::getURL($this, array(), "database/overview"));
Navigation::addItem("/admin/adminer", $nav);
}
}
开发者ID:Krassmus,项目名称:DatabaseAdminer,代码行数:8,代码来源:DatabaseAdminer.class.php
示例14: get_plugin_navigations
/**
* Loads all possible standard plugins for the given seminars and adds
* a navigation entry for each one.
*
* @param array $seminars List of seminars
* @return array Extended list of seminars
*/
protected function get_plugin_navigations($seminars)
{
foreach ($seminars as $id => $seminar) {
foreach (PluginEngine::getPlugins('StandardPlugin', $id) as $plugin) {
$seminars[$id]['navigations'][] = $plugin->getIconNavigation($id, time(), $GLOBALS['user']->id);
}
}
return $seminars;
}
开发者ID:ratbird,项目名称:hope,代码行数:16,代码来源:public_courses.php
示例15: 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
示例16: __construct
public function __construct()
{
parent::__construct();
$this->raumbelegung = new raumbelegung();
//Navigationselement AutoNavigation
$navigation = new AutoNavigation($this->getDisplayName(), PluginEngine::getURL($this, array(), "show"));
$tools = new AutoNavigation("Tools", PluginEngine::getURL($this, array(), "start"));
//Punkt an dem das Elements eingesetzt werden soll
Navigation::addItem('/start/Raumbelgungen/', clone $navigation);
}
开发者ID:robert-hanke,项目名称:Raumbelegungen,代码行数:10,代码来源:raumbelegungen.class.php
示例17: __construct
public function __construct()
{
parent::__construct();
$this->addStylesheet("assets/defaultform.less");
$nav = new Navigation(_("DefaultForm"), PluginEngine::getURL($this, array(), "example/index"));
Navigation::addItem("/start/defaultform", $nav);
$nav = clone $nav;
$nav->addSubNavigation("index", clone $nav);
Navigation::addItem("/defaultform", $nav);
}
开发者ID:Krassmus,项目名称:DefaultForm,代码行数:10,代码来源:DefaultForm.class.php
示例18: perform
/**
* This method dispatches and displays all actions. It uses the template
* method design pattern, so you may want to implement the methods #route
* and/or #display to adapt to your needs.
*
* @param string the part of the dispatch path, that were not consumed yet
*
* @return void
*/
function perform($unconsumed_path)
{
if (!$unconsumed_path) {
header("Location: " . PluginEngine::getUrl($this), 302);
return false;
}
$trails_root = $this->getPluginPath();
$dispatcher = new Trails_Dispatcher($trails_root, null, 'show');
$dispatcher->current_plugin = $this;
$dispatcher->dispatch($unconsumed_path);
}
开发者ID:noackorama,项目名称:source-talk-2012,代码行数:20,代码来源:TrailsPlugin.php
示例19: edit_action
function edit_action($area_id)
{
ForumPerm::check('edit_area', $this->getId(), $area_id);
if (Request::isAjax()) {
ForumEntry::update($area_id, studip_utf8decode(Request::get('name')), studip_utf8decode(Request::get('content')));
$this->render_json(array('content' => ForumEntry::killFormat(ForumEntry::killEdit(studip_utf8decode(Request::get('content'))))));
} else {
ForumEntry::update($area_id, Request::get('name'), Request::get('content'));
$this->flash['messages'] = array('success' => _('Die Änderungen am Bereich wurden gespeichert.'));
$this->redirect(PluginEngine::getLink('coreforum/index/index'));
}
}
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:area.php
示例20: getPortalTemplate
public function getPortalTemplate()
{
PageLayout::addScript($this->getPluginUrl() . '/js/QuickSelection.js');
$names = WidgetHelper::getWidgetUserConfig($GLOBALS['user']->id, 'QUICK_SELECTION');
$template_factory = new Flexi_TemplateFactory(__DIR__ . '/templates');
$template = $template_factory->open('list');
$template->navigation = $this->getFilteredNavigation($names);
$navigation = new Navigation('', PluginEngine::getLink($this, array(), 'configuration'));
$navigation->setImage(Icon::create('edit', 'clickable', ["title" => _('Konfigurieren')]), array('data-dialog' => 'size=auto'));
$template->icons = array($navigation);
return $template;
}
开发者ID:ratbird,项目名称:hope,代码行数:12,代码来源:QuickSelection.php
注:本文中的PluginEngine类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论