本文整理汇总了PHP中URL::backend方法的典型用法代码示例。如果您正苦于以下问题:PHP URL::backend方法的具体用法?PHP URL::backend怎么用?PHP URL::backend使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类URL
的用法示例。
在下文中一共展示了URL::backend方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: before
/**
* Configure Backend Controllers
*/
public function before()
{
parent::before();
// Configure Backend
require_once APPPATH . 'config' . DIRECTORY_SEPARATOR . 'backend.php';
// Navigation init
Navigation::init(Kohana::$config->load('sitemap')->as_array());
// Configure WebApp init data
WebApp::set_init_data(array('is_backend' => true, 'backend_url' => URL::backend(), 'base_url' => URL::site()));
}
示例2: go_backend
/**
* Go to Backend URL
*
* @param array|string $controller
* @param string $action
* @param string $id
*/
public function go_backend($controller = null, $action = null, $id = null)
{
$this->go(URL::backend($controller, $action, $id));
}
示例3: __
<div class="alert alert-danger alert-dark padding-xs">
<%= __('Plugin can not be installed. The required version of the CMS: :required_version. Version of your CMS is: :current_version.', {
':required_version': required_cms_version,
':current_version': '<?php
echo CMS_VERSION;
?>
'
}) %>
</div>
<% } %>
<% if (installed && settings) { %>
<?php
if (ACL::check('plugins.settings')) {
?>
<a href="<?php
echo URL::backend('plugins/settings');
?>
/<%= id %>" class="btn btn-default btn-sm pull-right">
<?php
echo UI::icon('cog');
?>
<span class="hidden-xs hidden-sm"><%= __('Settings') %></span>
</a>
<?php
}
?>
<% } %>
<h5 class="pull-left"><%= title %> <small>v<%= version %></small></h5>
<div class="clearfix"></div>
<% if (description) { %><p class="text-muted"><%= description %></p><% } %>
<% if (author) { %><small class="text-light-gray text-xs"><%= __('Author') %> <%= author %></small><% } %>
示例4: defined
<?php
defined('NEGOCORE') or die('No direct script access.');
/**
* Skeleton Module
*
* @author Iván Molina Pavana <imp@negocad.mx>
* @copyright Copyright (c) 2015, NegoCAD <info@negocad.mx>
* @version 1.0.0
*/
// --------------------------------------------------------------------------------
/**
* Navigation config for Module sitemap
*
* @filesource
* @link http://dev.negocad.mx/docs/negocore/navigation
*/
return array(array('name' => 'ModuleName', 'url' => URL::backend('module'), 'priority' => 100, 'icon' => 'globe'));
示例5: init_media
public function init_media()
{
$this->template_js_params = array('CURRENT_URL' => Request::current()->url(TRUE) . URL::query(), 'BASE_URL' => URL::backend(ADMIN_DIR_NAME, TRUE), 'SITE_URL' => URL::base(TRUE), 'ADMIN_DIR_NAME' => ADMIN_DIR_NAME, 'ADMIN_RESOURCES' => ADMIN_RESOURCES, 'PUBLIC_URL' => PUBLIC_URL, 'LOCALE' => I18n::lang(), 'CONTROLLER' => strtolower(Request::current()->controller()), 'ACTION' => Request::current()->action(), 'USER_ID' => Auth::get_id(), 'DATE_FORMAT' => Config::get('site', 'date_format'), 'IS_BACKEND' => IS_BACKEND, 'CLOSE_POPUP' => Session::instance()->get_once('close_popup', FALSE));
foreach (Messages::get() as $type => $messages) {
$this->template_js_params['MESSAGE_' . strtoupper($type)] = $messages;
}
}
示例6: children
public function children($parent_id, $level, $return = FALSE)
{
$expanded_rows = Arr::get($_COOKIE, 'cms_expanded_pages');
$expanded_rows = $expanded_rows == NULL ? array() : explode(',', $expanded_rows);
$page = ORM::factory('page', $parent_id);
if (!$page->loaded()) {
return;
}
$pages = ORM::factory('page')->children_of($parent_id);
$behavior = Behavior::get($page->behavior_id);
if (!empty($behavior['limit'])) {
$pages->limit((int) $behavior['limit']);
}
$childrens = $pages->find_all()->as_array('id');
foreach ($childrens as $index => $child) {
$childrens[$index]->has_children = $child->has_children();
$child_behavior = Behavior::get($child->behavior_id);
if (!empty($child_behavior['link'])) {
$childrens[$index]->has_children = TRUE;
}
$childrens[$index]->is_expanded = in_array($child->id, $expanded_rows);
if ($childrens[$index]->is_expanded === TRUE) {
$childrens[$index]->children_rows = $this->children($child->id, $level + 1, true);
}
}
if (!empty($behavior['limit'])) {
$childrens[] = '...';
}
if (!empty($behavior['link'])) {
$link = strtr($behavior['link'], array(':id' => $parent_id));
$childrens[] = __(':icon :link', array(':icon' => UI::icon('book'), ':link' => HTML::anchor(URL::backend($link), __(ucfirst($page->behavior_id)))));
}
$content = View::factory('page/children', array('childrens' => $childrens, 'level' => $level + 1, 'expanded_rows' => $expanded_rows));
if ($return === TRUE) {
return $content;
}
echo $content;
}
示例7: get_response
/**
* Generate a Response for the 401 Exception
*
* The user should be redirect to a login page.
*
* @return Response
* @throws Kohana_Exception
*/
public function get_response()
{
Flash::set('redirect', Request::current()->uri());
return Response::factory()->status(401)->headers('Location', URL::backend('auth', 'login'));
}
示例8: json_redirect
/**
*
* @param string $uri
*/
public function json_redirect($uri)
{
$this->json['redirect'] = URL::backend($uri);
}