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


PHP PluginEngine::getUrl方法代码示例

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


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

示例1: url_for

 function url_for($to = '', $params = array()) {
     if($to === '') {
         $to = substr(strtolower(get_class($this)), 0, -10) . '/' . $this->current_action;
     }
     $url = PluginEngine::getUrl($this->plugin, $params, $to);
     return $url;
 }
开发者ID:noackorama,项目名称:blubberforum,代码行数:7,代码来源:application.php

示例2: __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

示例3: 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

示例4: if

<? $js   = "STUDIP.Forum.loadAction('#abolink', '"
         . (ForumAbo::has($constraint['topic_id']) ? 'remove_' : '') 
         . 'abo/'. $constraint['topic_id'] ."'); return false;";

    $url = PluginEngine::getUrl('coreforum/index/'
         . (ForumAbo::has($constraint['topic_id']) ? 'remove_' : '') 
         . 'abo/'. $constraint['topic_id']);
?>

<? $text = $constraint['area'] ? _('Diesen Bereich abonnieren') : _('Dieses Thema abonnieren') ?>
<? if ($constraint['depth'] == 0) :
    $text = _('Komplettes Forum abonnieren');
endif ?>

<? if (!ForumAbo::has($constraint['topic_id'])) : ?>
    <?php 
echo Studip\LinkButton::create($text, $url, array('title' => _('Wenn sie diesen Bereich abonnieren, erhalten Sie eine ' . 'Stud.IP-interne Nachricht sobald in diesem Bereich ' . 'ein neuer Beitrag erstellt wurde.'), 'onClick' => $js));
?>
<? else : ?>
    <?php 
echo Studip\LinkButton::create(_('Nicht mehr abonnieren'), $url, array('onClick' => $js));
?>
<? endif; ?>
开发者ID:ratbird,项目名称:hope,代码行数:23,代码来源:_abo_link.php

示例5: delete_entry_action

 /**
  * Delete the submitted entry.
  * 
  * @param string $topic_id the entry to delete
  */
 function delete_entry_action($topic_id)
 {
     // get the page of the posting to be able to jump there again
     $page = ForumEntry::getPostingPage($topic_id);
     URLHelper::addLinkParam('page', $page);
     if (ForumPerm::hasEditPerms($topic_id) || ForumPerm::check('remove_entry', $this->getId(), $topic_id)) {
         $path = ForumEntry::getPathToPosting($topic_id);
         $topic = array_pop($path);
         $parent = array_pop($path);
         if ($topic_id != $this->getId()) {
             // only delete directly if passed by ajax, otherwise ask for confirmation
             if (Request::isXhr() || Request::get('approve_delete')) {
                 ForumEntry::delete($topic_id);
                 $this->flash['messages'] = array('success' => sprintf(_('Der Eintrag %s wurde gelöscht!'), $topic['name']));
             } else {
                 $this->flash['messages'] = array('info_html' => sprintf(_('Sind sie sicher dass Sie den Eintrag %s löschen möchten?'), $topic['name']) . '<br>' . \Studip\LinkButton::createAccept(_('Ja'), PluginEngine::getUrl('coreforum/index/delete_entry/' . $topic_id . '?approve_delete=1')) . \Studip\LinkButton::createCancel(_('Nein'), PluginEngine::getUrl('coreforum/index/index/' . ForumEntry::getParentTopicId($topic_id) . '/' . $page)));
             }
         } else {
             $this->flash['messages'] = array('success' => _('Sie können nicht die gesamte Veranstaltung löschen!'));
         }
     }
     if (Request::isXhr()) {
         $this->render_template('messages');
         $this->flash['messages'] = null;
     } else {
         $this->redirect(PluginEngine::getLink('coreforum/index/index/' . $parent['id'] . '/' . $page));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:33,代码来源:index.php

示例6: if

" <?php 
echo $edit_posting != $post['topic_id'] ? '' : 'style="display: none;"';
?>
>
            <!-- Aktions-Buttons für diesen Beitrag -->


            <? if (ForumPerm::has('add_entry', $constraint['seminar_id'])) : ?>
                <?php 
echo Studip\LinkButton::create(_('Beitrag zitieren'), PluginEngine::getLink('coreforum/index/cite/' . $post['topic_id']), array('onClick' => "javascript:STUDIP.Forum.citeEntry('" . $post['topic_id'] . "'); return false;", 'class' => !$perms['edit_closed'] ? 'hideWhenClosed' : '', 'style' => !$can_edit_closed ? 'display: none' : ''));
?>
            <? endif ?>

            <? if ($section == 'index' && $perms['edit']) : ?>
                <?php 
echo Studip\LinkButton::create(_('Beitrag bearbeiten'), PluginEngine::getUrl('coreforum/index/index/' . $post['topic_id'] . '/?edit_posting=' . $post['topic_id']), array('onClick' => "STUDIP.Forum.editEntry('" . $post['topic_id'] . "'); return false;", 'class' => !$perms['edit_closed'] ? 'hideWhenClosed' : '', 'style' => !$can_edit_closed ? 'display: none' : ''));
?>
            <? endif ?>
            
            <? if ($section == 'index') : ?>
            <span <?php 
echo !$perms['edit_close'] && !$perms['remove_entry'] ? 'class="hideWhenClosed"' : '';
?>
                <?php 
echo !$perms['edit'] && !$perms['remove_entry'] ? 'style="display: none"' : '';
?>
>
                <? $confirmLink = PluginEngine::getURL('coreforum/index/delete_entry/' . $post['topic_id'])  ?>
                <? $confirmLinkApproved = PluginEngine::getURL('coreforum/index/delete_entry/' . $post['topic_id'] . '?approve_delete=1')  ?>
                <? if ($constraint['depth'] == $post['depth']) : /* this is not only a posting, but a thread */ ?>
                    <? $confirmText = _('Wenn Sie diesen Beitrag löschen wird ebenfalls das gesamte Thema gelöscht. Sind Sie sicher, dass Sie das tun möchten?')  ?>
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:_post.php


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