本文整理汇总了PHP中PluginEngine::getLink方法的典型用法代码示例。如果您正苦于以下问题:PHP PluginEngine::getLink方法的具体用法?PHP PluginEngine::getLink怎么用?PHP PluginEngine::getLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PluginEngine
的用法示例。
在下文中一共展示了PluginEngine::getLink方法的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: 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;
}
示例3: 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);
}
示例4: 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);
}
示例5: 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');
}
示例6: 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;
}
示例7: 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'));
}
}
示例8: profile_action
public function profile_action()
{
PageLayout::addHeadElement("script", array('src' => $this->assets_url . "/javascripts/autoresize.jquery.min.js"), "");
PageLayout::addHeadElement("script", array('src' => $this->assets_url . "/javascripts/blubberforum.js"), "");
PageLayout::addHeadElement("script", array('src' => $this->assets_url . "/javascripts/formdata.js"), "");
if (Request::get("extern")) {
$this->user = BlubberExternalContact::find(Request::get("user_id"));
} else {
$this->user = new BlubberUser(Request::get("user_id"));
}
PageLayout::setTitle(htmlReady($this->user->getName()) . " - Blubber");
PageLayout::addHeadElement("link", array('rel' => "alternate", 'type' => "application/atom+xml", 'href' => PluginEngine::getLink($this->plugin, array(), "forum/feed/" . $this->user->getId()), 'title' => "Blubber von " . get_fullname($user_id)));
$this->threads = ForumPosting::getThreads(array('user_id' => $this->user->getId(), 'limit' => $this->max_threads + 1));
$this->more_threads = count($this->threads) > $this->max_threads;
$this->course_id = $_SESSION['SessionSeminar'];
if ($this->more_threads) {
$this->threads = array_slice($this->threads, 0, $this->max_threads);
}
}
示例9: foreach
<? foreach ($releases as $release) : ?>
<tr>
<td>
<a href="<?php
echo PluginEngine::getLink($plugin, array(), "download/" . $release['name']);
?>
">
<?php
echo htmlReady($release['name']);
?>
</a>
</td>
<td>
<?php
echo date("j.n.Y", strtotime($release['date']));
?>
</td>
<td style="text-align: right;">
<a href="<?php
echo PluginEngine::getLink($plugin, array(), "download/" . $release['name']);
?>
">
<?php
echo Icon::create("download", "clickable")->asImg("20px", ['class' => "text-bottom"]);
?>
</a>
</td>
</tr>
<? endforeach ?>
</tbody>
</table>
示例10: formatReady
echo formatReady($scm->content);
?>
<? else: ?>
<?php
echo MessageBox::info(_('In diesem Bereich wurden noch keine Inhalte erstellt.'));
?>
<? endif; ?>
</td>
</tr>
</tbody>
<? if ($priviledged): ?>
<tfoot class="table_footer">
<tr>
<td colspan="2">
<?php
echo LinkButton::create(_('Bearbeiten'), PluginEngine::getLink($this->plugin, array(), 'show/edit/' . $scm->id), array('data-dialog' => ''));
?>
<? if (count($scms) > 1): ?>
<? if ($scm->position == 0): ?>
<?php
echo Button::create(_('Nach vorne'), array('disabled' => 'disabled'));
?>
<? else: ?>
<? endif; ?>
<?php
echo LinkButton::create(_('Löschen'), $controller->url_for('show/' . $scm->id . '?verify=delete'), array('title' => _('Diese Seite löschen')));
?>
<? endif; ?>
</td>
</tr>
</tfoot>
示例11: if
echo Icon::create($plugin->getPluginURL() . "/assets/star{$v}.svg")->asImg($starwidth);
?>
<? $v = $material['rating'] >= 3.75 ? 3 : ($material['rating'] >= 3.25 ? 2 : "") ?>
<?php
echo Icon::create($plugin->getPluginURL() . "/assets/star{$v}.svg")->asImg($starwidth);
?>
<? $v = $material['rating'] >= 4.75 ? 3 : ($material['rating'] >= 4.25 ? 2 : "") ?>
<?php
echo Icon::create($plugin->getPluginURL() . "/assets/star{$v}.svg")->asImg($starwidth);
?>
<? endif ?>
</td>
<td>
<? if ($material['user_id'] === $GLOBALS['user']->id) : ?>
<a href="<?php
echo PluginEngine::getLink($plugin, array(), "mymaterial/edit/" . $material->getId());
?>
" data-dialog title="<?php
echo _("Lernmaterial bearbeiten");
?>
">
<?php
echo Icon::create("edit", "clickable")->asImg(20);
?>
</a>
<? endif ?>
</td>
</tr>
<? endforeach ?>
</tbody>
</table>
示例12: _
?>
<?php
echo _("Dazu einen Kommentar schreiben");
?>
</a>
<? endif ?>
</div>
</div>
</li>
<? endforeach ?>
</ul>
<div style="text-align: center;">
<? if ($material['host_id'] || $material['user_id'] !== $GLOBALS['user']->id) : ?>
<?php
echo \Studip\LinkButton::create(_("Review schreiben"), PluginEngine::getLink($plugin, array(), 'market/review/' . $material->getId()), array('data-dialog' => 1));
?>
<? endif ?>
</div>
</div>
<?
Sidebar::Get()->setImage($plugin->getPluginURL()."/assets/sidebar-service.png");
if ($GLOBALS['perm']->have_perm("autor")) {
$actions = new ActionsWidget();
$actions->addLink(
_("Eigenes Lernmaterial hochladen"),
PluginEngine::getURL($plugin, array(), "mymaterial/edit"),
Icon::create("add", "clickable"),
示例13: array
<form action="<?php
echo PluginEngine::getLink($plugin, array(), "mymaterial/add_tags");
?>
" method="post" class="default">
<input type="text" name="tag" placeholder="<?php
echo _("Thema oder Schlagwort ...");
?>
">
<input type="hidden" name="material_id" value="<?php
echo $this->material->getId();
?>
">
<div data-dialog-button>
<?php
echo \Studip\Button::create(_("Hinzufügen"));
?>
</div>
</form>
示例14: array
<form action="<?php
echo PluginEngine::getLink($plugin, array(), "market/review/" . $material->getId());
?>
" method="post" class="default">
<select name="rating">
<option value="0">0 <?php
echo _("Sterne");
?>
</option>
<option value="1"<?php
echo $review['rating'] == 1 ? " selected" : "";
?>
>1 <?php
echo _("Stern");
?>
</option>
<option value="2"<?php
echo $review['rating'] == 2 ? " selected" : "";
?>
>2 <?php
echo _("Sterne");
?>
</option>
<option value="3"<?php
echo $review['rating'] == 3 ? " selected" : "";
?>
>3 <?php
echo _("Sterne");
?>
</option>
<option value="4"<?php
示例15: htmlReady
<form method="post" action="<?php
echo PluginEngine::getLink('coreforum/index/edit_category/' . $category_id);
?>
">
<input type="text" required name="name" size="40" maxlength="255" value="<?php
echo htmlReady($categories[$category_id]);
?>
">
<?php
echo Studip\Button::createAccept(_('Kategorie speichern'), '', array('onClick' => "javascript:STUDIP.Forum.saveCategoryName('" . $category_id . "'); return false;"));
?>
<?php
echo Studip\LinkButton::createCancel(_('Abbrechen'), PluginEngine::getLink('coreforum/index/index#cat_' . $category_id), array('onClick' => "STUDIP.Forum.cancelEditCategoryName('" . $category_id . "'); return false;"));
?>
</form>