本文整理汇总了PHP中PluginEngine类的典型用法代码示例。如果您正苦于以下问题:PHP PluginEngine类的具体用法?PHP PluginEngine怎么用?PHP PluginEngine使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PluginEngine类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
}
示例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);
}
示例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");
}
示例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"));
}
}
}
}
示例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');
}
示例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');
}
}
示例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);
}
}
示例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;
}
示例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();
}