本文整理汇总了PHP中Uri::createNL方法的典型用法代码示例。如果您正苦于以下问题:PHP Uri::createNL方法的具体用法?PHP Uri::createNL怎么用?PHP Uri::createNL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Uri
的用法示例。
在下文中一共展示了Uri::createNL方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: languageSwitchDropdown
/**
* System front end theme function
*
* @author Vee W.
* @license http://opensource.org/licenses/MIT
*
*/
function languageSwitchDropdown()
{
$languages = \Config::get('locales');
// no languages, language is empty, there is only just one language
if (empty($languages) || !is_array($languages) || count($languages) <= 1) {
return null;
}
ksort($languages);
$current_lang = \Lang::get_lang();
$output = "\n" . '<div class="dropdown">' . "\n";
$output .= "\t" . '<button class="btn btn-default dropdown-toggle" type="button" id="language-switch-dropdown" data-toggle="dropdown">';
$output .= $languages[$current_lang]['name'];
$output .= '<span class="caret"></span>';
$output .= '</button>' . "\n";
if (is_array($languages) && !empty($languages) && count($languages) > 1) {
$output .= '<ul class="dropdown-menu" role="menu" aria-labelledby="language-switch-dropdown">' . "\n";
foreach ($languages as $language => $item) {
if ($language != $current_lang) {
$output .= "\t" . '<li>' . \Html::anchor(\Uri::createNL($language), $item['name']) . '</li>' . "\n";
}
}
$output .= '</ul>' . "\n";
}
$output .= '</div>' . "\n";
return $output;
}
示例2: getRootSiteURL
echo $theme->asset->render('fuelstart');
?>
<script type="text/javascript">
// required js variables for use in .js file.
var base_url = '<?php
echo \Uri::base(false);
?>
';
var site_url = '<?php
echo getRootSiteURL();
?>
';
var theme_assets = '<?php
echo Uri::createNL(\Theme::instance()->asset_path(''));
?>
';
var csrf_name = '<?php
echo \Config::get('security.csrf_token_key');
?>
';
var nocsrf_val = '<?php
echo \Extension\NoCsrf::generate('', true);
?>
';
</script>
</head>
<body class="html-body<?php
echo $pc_class . ' ' . $page_class;
?>
示例3: languageSwitchAdminSelectBox
/**
* language switch for admin page. display as select box.
*
* @return string
*/
function languageSwitchAdminSelectBox()
{
$languages = \Config::get('locales');
ksort($languages);
$current_lang = \Lang::get_lang();
$output = "\n" . '<select name="admin_language" onchange="change_redirect($(this));" class="form-control chosen-select">' . "\n";
if (is_array($languages) && !empty($languages)) {
foreach ($languages as $language => $item) {
$output .= "\t" . '<option value="' . \Uri::createNL($language . '/admin') . '"';
if ($language == $current_lang) {
$output .= ' selected="selected"';
}
$output .= '>' . $item['name'] . '</option>' . "\n";
}
} else {
$output .= "\t" . '<option></option>' . "\n";
}
$output .= '</select>' . "\n";
unset($current_lang, $languages);
return $output;
}
示例4: __
echo __('account_avatar');
?>
:</label>
<div class="col-sm-7">
<?php
if (isset($account_avatar) && $account_avatar != null) {
?>
<div class="current-avatar">
<a href="#" class="btn btn-danger btn-xs" onclick="return ajaxDeleteAvatar();"><span class="glyphicon glyphicon-remove"></span> <?php
echo __('account_delete_avatar');
?>
</a>
<span class="remove-avatar-status"></span>
<img src="<?php
echo \Uri::createNL($account_avatar);
?>
" alt="" class="img-responsive" />
</div>
<?php
}
// endif $account_avatar;
?>
<input type="hidden" name="MAX_FILE_SIZE" value="<?php
echo $avatar_size * 1024;
// KB to Bytes
?>
" />
<?php
echo \Form::file('account_avatar', array('id' => 'account_avatar'));