本文整理汇总了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());
}
示例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;
示例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() ?>