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


PHP Uri::to方法代码示例

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


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

示例1: paginate

 public static function paginate($page = 1, $perpage = 10)
 {
     $query = Query::table(static::table());
     $count = $query->count();
     $results = $query->take($perpage)->skip(($page - 1) * $perpage)->sort('title')->get();
     return new Paginator($results, $count, $page, $perpage, Uri::to('admin/companies'));
 }
开发者ID:pepfi,项目名称:anchor-cms,代码行数:7,代码来源:company.php

示例2: paginate

 public static function paginate($page = 1, $perpage = 10)
 {
     $query = Query::table(static::table());
     $count = $query->count();
     $results = $query->take($perpage)->skip(($page - 1) * $perpage)->sort('real_name', 'desc')->get();
     return new Paginator($results, $count, $page, $perpage, Uri::to('users'));
 }
开发者ID:gautamkrishnar,项目名称:Anchor-CMS-openshift-quickstart,代码行数:7,代码来源:user.php

示例3: link

 public static function link($uri, $title = '', $attributes = array())
 {
     if (strpos('#', $uri) !== 0) {
         $uri = Uri::to($uri);
     }
     if ($title == '') {
         $title = $uri;
     }
     $attributes['href'] = $uri;
     return static::element('a', $title, $attributes);
 }
开发者ID:anchorcms,项目名称:anchor-cms,代码行数:11,代码来源:html.php

示例4: array

<?php

echo $header;
?>

    <form method="post" action="<?php 
echo Uri::to('admin/posts/edit/' . $article->id);
?>
"
          enctype="multipart/form-data" novalidate>

        <input name="token" type="hidden" value="<?php 
echo $token;
?>
">

        <fieldset class="header">
            <div class="wrap">
                <?php 
echo $messages;
?>
            </div>
        </fieldset>

        <fieldset class="main">
            <div class="wrap">
                <?php 
echo Form::text('title', Input::previous('title', $article->title), array('placeholder' => __('posts.title'), 'autocomplete' => 'off', 'autofocus' => 'true'));
?>
                <?php 
echo Form::textarea('html', Input::previous('html', $article->html), array('placeholder' => __('posts.content_explain'), 'class' => 'ckeditorgo'));
开发者ID:Rictus,项目名称:CMS_Prod,代码行数:31,代码来源:edit.php

示例5: function

     $vars['messages'] = Notify::read();
     $vars['posts'] = $pagination;
     $vars['category'] = $category;
     $vars['categories'] = Category::sort('title')->get();
     $vars['status'] = 'all';
     return View::create('posts/index', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
 });
 /*
 	List posts by status and paginate through them
 */
 Route::get(array('admin/posts/status/(:any)', 'admin/posts/status/(:any)/(:num)'), function ($status, $post = 1) {
     $query = Post::where('status', '=', $status);
     $perpage = Config::meta('posts_per_page');
     $total = $query->count();
     $posts = $query->sort('title')->take($perpage)->skip(($post - 1) * $perpage)->get();
     $url = Uri::to('admin/posts/status');
     $pagination = new Paginator($posts, $total, $post, $perpage, $url);
     $vars['messages'] = Notify::read();
     $vars['posts'] = $pagination;
     $vars['status'] = $status;
     $vars['categories'] = Category::sort('title')->get();
     return View::create('posts/index', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
 });
 /*
 	Edit post
 */
 Route::get('admin/posts/edit/(:num)', function ($id) {
     $vars['messages'] = Notify::read();
     $vars['token'] = Csrf::token();
     $vars['article'] = Post::find($id);
     $vars['page'] = Registry::get('posts_page');
开发者ID:pepfi,项目名称:anchor-cms,代码行数:31,代码来源:posts.php

示例6: __

?>

<hgroup class="wrap">
	<h1><?php 
echo __('extend.create_variable');
?>
</h1>
</hgroup>

<section class="wrap">
	<?php 
echo $messages;
?>

	<form method="post" action="<?php 
echo Uri::to('admin/extend/variables/add');
?>
" novalidate>

		<input name="token" type="hidden" value="<?php 
echo $token;
?>
">

		<fieldset class="split">
			<p>
				<label><?php 
echo __('extend.name');
?>
:</label>
				<?php 
开发者ID:gautamkrishnar,项目名称:Anchor-CMS-openshift-quickstart,代码行数:31,代码来源:add.php

示例7: asset

?>
"></script>
    <script src="<?php 
echo asset('anchor/views/assets/js/change-saver.js');
?>
"></script>
    <script src="<?php 
echo asset('anchor/views/assets/js/autosave.js');
?>
"></script>
    <script>
        $('textarea[name=markdown]').editor();
        $('#pagetype').on('change', function() {
            var $this = $(this);
            $.post("<?php 
echo Uri::to('admin/get_fields');
?>
", {
                id: <?php 
echo $page->id;
?>
,
                pagetype: $this.val(),
                token: "<?php 
echo $token;
?>
"
            }, function(res){
                res = JSON.parse(res);
                $('#extended-fields').html(res.html);
                $('input[name="token"]').replaceWith(res.token);
开发者ID:Rictus,项目名称:CMS_Prod,代码行数:31,代码来源:edit.php

示例8: base_url

function base_url($url = '')
{
    return Uri::to($url);
}
开发者ID:biggtfish,项目名称:anchor-cms,代码行数:4,代码来源:helpers.php

示例9: __

echo $header;
?>

<hgroup class="wrap">
	<h1><?php 
echo __('extend.editing_custom_field', $field->label);
?>
</h1>
</hgroup>

<section class="wrap">
	

	<form method="post" action="<?php 
echo Uri::to('admin/extend/fields/edit/' . $field->id);
?>
" novalidate>

		<input name="token" type="hidden" value="<?php 
echo $token;
?>
">

		<fieldset class="split">
			<p>
				<label for="label-type"><?php 
echo __('extend.type');
?>
:</label>
				<?php 
开发者ID:anchorcms,项目名称:anchor-cms,代码行数:30,代码来源:edit.php

示例10: array

		<aside class="buttons">
			<?php 
    echo Form::button(__('global.create'), array('class' => 'btn', 'type' => 'submit'));
    ?>

			<?php 
    echo Html::link('admin/users', __('global.cancel'), array('class' => 'btn cancel blue'));
    ?>
		</aside>
	</form>
	<?php 
} else {
    ?>
		<p>You do not have the required privileges to add users, you must be an Administrator. Please contact the Administrator of the site if you are supposed to have these privileges.</p>
		<br><a class="btn" href="<?php 
    echo Uri::to('admin/users');
    ?>
">Go back</a>
	<?php 
}
?>
</section>

<script src="<?php 
echo asset('anchor/views/assets/js/upload-fields.js');
?>
"></script>

<?php 
echo $footer;
开发者ID:anchorcms,项目名称:anchor-cms,代码行数:30,代码来源:add.php

示例11: Paginator

     $url = Uri::to('admin/pages');
     $pagination = new Paginator($pages, $total, $page, $perpage, $url);
     $vars['messages'] = Notify::read();
     $vars['pages'] = $pagination;
     $vars['status'] = 'all';
     return View::create('pages/index', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
 });
 /*
 	List pages by status and paginate through them
 */
 Route::get(array('admin/pages/status/(:any)', 'admin/pages/status/(:any)/(:num)'), function ($status, $page = 1) {
     $query = Page::where('status', '=', $status);
     $perpage = Config::meta('posts_per_page');
     $total = $query->count();
     $pages = $query->sort('title')->take($perpage)->skip(($page - 1) * $perpage)->get();
     $url = Uri::to('admin/pages/status');
     $pagination = new Paginator($pages, $total, $page, $perpage, $url);
     $vars['messages'] = Notify::read();
     $vars['pages'] = $pagination;
     $vars['status'] = $status;
     return View::create('pages/index', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
 });
 /*
 	Edit Page
 */
 Route::get('admin/pages/edit/(:num)', function ($id) {
     $vars['messages'] = Notify::read();
     $vars['token'] = Csrf::token();
     $vars['page'] = Page::find($id);
     $vars['pages'] = Page::dropdown(array('exclude' => array($id), 'show_empty_option' => true));
     $vars['statuses'] = array('published' => __('global.published'), 'draft' => __('global.draft'), 'archived' => __('global.archived'));
开发者ID:gautamkrishnar,项目名称:Anchor-CMS-openshift-quickstart,代码行数:31,代码来源:pages.php

示例12: array

			<?php 
echo Form::text('user', $user, array('id' => 'label-user', 'autocapitalize' => 'off', 'autofocus' => 'true', 'placeholder' => __('users.username')));
?>
</p>

			<p><label for="label-pass"><?php 
echo __('users.password');
?>
:</label>
			<?php 
echo Form::password('pass', array('id' => 'pass', 'placeholder' => __('users.password'), 'autocomplete' => 'off'));
?>
</p>

			<p class="buttons"><a href="<?php 
echo Uri::to('admin/amnesia');
?>
"><?php 
echo __('users.forgotten_password');
?>
</a>
			<button type="submit"><?php 
echo __('global.login');
?>
</button></p>
		</fieldset>
	</form>

</section>

<?php 
开发者ID:anchorcms,项目名称:anchor-cms,代码行数:31,代码来源:login.php

示例13: comment_form_url

function comment_form_url()
{
    return Uri::to(Uri::current());
}
开发者ID:silviuu,项目名称:blg,代码行数:4,代码来源:comments.php

示例14: array

<?php

echo $header;
?>

    <form method="post" action="<?php 
echo Uri::to('admin/pages/add');
?>
" enctype="multipart/form-data" novalidate>

        <input name="token" type="hidden" value="<?php 
echo $token;
?>
">

        <fieldset class="header">
            <div class="wrap">
                <?php 
echo $messages;
?>

                <?php 
echo Form::text('title', Input::previous('title'), array('placeholder' => __('pages.title'), 'autocomplete' => 'off', 'autofocus' => 'true'));
?>

                <aside class="buttons">
                    <?php 
echo Form::button(__('global.save'), array('type' => 'submit', 'class' => 'btn'));
?>

                    <?php 
开发者ID:Rictus,项目名称:CMS_Prod,代码行数:31,代码来源:add.php

示例15: foreach

	</nav>

</hgroup>

<section class="wrap">
	<?php 
echo $messages;
?>

	<ul class="list">
		<?php 
foreach ($companies->results as $company) {
    ?>
             <li>
             	<a href="<?php 
    echo Uri::to('admin/companies/edit/' . $company->id);
    ?>
">
             	<strong><?php 
    echo $company->title;
    ?>
</strong>

             	<span><?php 
    echo $company->slug;
    ?>
</span>
             </li>
		<?php 
}
?>
开发者ID:pepfi,项目名称:anchor-cms,代码行数:31,代码来源:index.php


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