當前位置: 首頁>>代碼示例>>PHP>>正文


PHP URLHelper::getLinkParams方法代碼示例

本文整理匯總了PHP中URLHelper::getLinkParams方法的典型用法代碼示例。如果您正苦於以下問題:PHP URLHelper::getLinkParams方法的具體用法?PHP URLHelper::getLinkParams怎麽用?PHP URLHelper::getLinkParams使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在URLHelper的用法示例。


在下文中一共展示了URLHelper::getLinkParams方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testAddLinkParam

 public function testAddLinkParam()
 {
     $this->assertEquals(array(), URLHelper::getLinkParams());
     URLHelper::addLinkParam('foo', 'bar');
     $this->assertEquals(array('foo' => 'bar'), URLHelper::getLinkParams());
     URLHelper::addLinkParam('answer', 42);
     $this->assertEquals(array('foo' => 'bar', 'answer' => '42'), URLHelper::getLinkParams());
 }
開發者ID:ratbird,項目名稱:hope,代碼行數:8,代碼來源:UrlHelperTest.php

示例2: first_decision

/* ---
 * Mögliche Datenschutz-/Sichtbarkeitsentscheidung: Beim ersten Login wird ein
 * informierender Text mit Entscheidungsmöglichkeit: "Ich will sichtbar sein" oder
 * "Ich will unsichtbar sein" angezeigt.
 *
 * Bei Nutzung dieser Funktion unbedingt die Texte unter locale/de/LC_HELP/visibility_decision.php bzw.
 * locale/en/LC_HELP/visibility_decision.php an die lokalen Verhältnisse anpassen!
 */
if ($GLOBALS['USER_VISIBILITY_CHECK'] && is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') {
    require_once 'lib/user_visible.inc.php';
    first_decision($GLOBALS['user']->id);
}
if (PageLayout::isHeaderEnabled()) {
    $header_template = $GLOBALS['template_factory']->open('header');
    $header_template->current_page = PageLayout::getTitle();
    $header_template->link_params = array_fill_keys(array_keys(URLHelper::getLinkParams()), NULL);
    if (is_object($GLOBALS['user']) && $GLOBALS['user']->id != 'nobody') {
        // only mark course if user is logged in and free access enabled
        if (get_config('ENABLE_FREE_ACCESS') && Navigation::hasItem('/course') && Navigation::getItem('/course')->isActive()) {
            // indicate to the template that this course is publicly visible
            // need to handle institutes separately (always visible)
            if ($GLOBALS['SessSemName']['class'] == 'inst') {
                $header_template->public_hint = _('öffentliche Einrichtung');
            } else {
                if (Course::findCurrent()->lesezugriff == 0) {
                    $header_template->public_hint = _('öffentliche Veranstaltung');
                }
            }
        }
        if ($GLOBALS['user']->cfg->getValue('ACCESSKEY_ENABLE')) {
            $header_template->accesskey_enabled = true;
開發者ID:ratbird,項目名稱:hope,代碼行數:31,代碼來源:header.php

示例3: htmlReady

echo $GLOBALS['ASSETS_URL'];
?>
";
        STUDIP.STUDIP_SHORT_NAME = "<?php 
echo Config::get()->STUDIP_SHORT_NAME;
?>
";
        String.locale = "<?php 
echo htmlReady(strtr($_SESSION['_language'], '_', '-'));
?>
";
        <? if (is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('autor') && PersonalNotifications::isActivated()) : ?>
        STUDIP.jsupdate_enable = true;
        <? endif ?>
        STUDIP.URLHelper.parameters = <?php 
echo json_encode(studip_utf8encode(URLHelper::getLinkParams()));
?>
;
    </script>
    <?php 
// needs to be included in lib/include/html_head.inc.php as well
include 'app/views/WysiwygHtmlHead.php';
?>
</head>

<body id="<?php 
echo $body_id ? $body_id : PageLayout::getBodyElementId();
?>
">
<div id="layout_wrapper">
    <? SkipLinks::insertContainer() ?>
開發者ID:ratbird,項目名稱:hope,代碼行數:31,代碼來源:base.php


注:本文中的URLHelper::getLinkParams方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。