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


PHP Uri::createNL方法代码示例

本文整理汇总了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;
}
开发者ID:rundiz,项目名称:fuel-start,代码行数:33,代码来源:functions.php

示例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;
?>
开发者ID:rundiz,项目名称:fuel-start,代码行数:31,代码来源:inc_html_head.php

示例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;
}
开发者ID:rundiz,项目名称:fuel-start,代码行数:26,代码来源:inc_functions.php

示例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'));
开发者ID:rundiz,项目名称:fuel-start,代码行数:31,代码来源:form_v.php


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