本文整理汇总了PHP中zbase_url_from_route函数的典型用法代码示例。如果您正苦于以下问题:PHP zbase_url_from_route函数的具体用法?PHP zbase_url_from_route怎么用?PHP zbase_url_from_route使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zbase_url_from_route函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testBackendLoginPage
/**
* @group Urls
* @group Auth
*/
function testBackendLoginPage()
{
/**
* Test that guest cannot access member area or authed areas
* Test redirected to login page
*/
$this->visit(zbase_url_from_route('admin'))->seePageIs(zbase_url_from_route('admin.login'));
$this->assertEquals(302, $this->call('GET', zbase_url_from_route('admin'))->status());
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:13,代码来源:AuthControllerTest.php
示例2: function
<?php
/**
* Dx
*
* @link http://dennesabing.com
* @author Dennes B Abing <[email protected]>
* @license proprietary
* @copyright Copyright (c) 2015 ClaremontDesign/MadLabs-Dx
* @version 0.0.0.1
* @since Mar 8, 2016 10:37:59 AM
* @file widget.php
* @project Expression project.name is undefined on line 13, column 15 in Templates/Scripting/EmptyPHP.php.
* @package Expression package is undefined on line 14, column 15 in Templates/Scripting/EmptyPHP.php.
*
*/
return ['type' => 'form', 'enable' => function () {
return zbase_config_get('modules.account.widgets.notifications.enable', true);
}, 'config' => ['entity' => ['name' => 'user', 'method' => 'currentUser', 'repo' => ['method' => 'currentUser']], 'event' => ['email' => ['post' => ['redirect' => ['enable' => false]]]], 'form' => ['startTag' => ['action' => function () {
if (zbase_is_back()) {
return zbase_url_from_route('admin.account', ['action' => 'email']);
}
}, 'html' => ['attributes' => ['class' => ['zbase-ajax-form']]]]], 'elements' => ['email' => ['type' => 'email', 'id' => 'email', 'label' => 'Email Address', 'entity' => ['property' => 'email'], 'angular' => ['ngModel' => 'currentUser.email'], 'html' => ['attributes' => ['input' => ['autocomplete' => 'off']]], 'validations' => ['required' => ['enable' => true, 'message' => 'Email address is required.'], 'unique' => ['enable' => true, 'text' => function () {
return 'unique:' . zbase_entity('user')->getTable() . ',email,' . zbase_auth_user()->id() . ',user_id';
}, 'message' => 'Email address already exists.'], 'not_in' => ['enable' => true, 'text' => function () {
return 'not_in:' . zbase_auth_user()->email;
}, 'message' => 'Please provide a different email address.']]]]]];
开发者ID:claremontdesign,项目名称:zbase,代码行数:27,代码来源:account-notifications.php
示例3: zbase_url_from_route
echo zbase_url_from_route('account');
?>
">
<i class="fa fa-user"></i> My Profile
</a>
</li>
<li class="divider">
</li>
<li>
<a href="javascript:;" id="trigger_fullscreen">
<i class="fa fa-arrows"></i> Full Screen
</a>
</li>
<li>
<a href="<?php
echo zbase_url_from_route('logout');
?>
">
<i class="fa fa-key"></i> Log Out
</a>
</li>
</ul>
</li>
<?php
}
?>
<!-- END USER LOGIN DROPDOWN -->
</ul>
<!-- END TOP NAVIGATION MENU -->
</div>
<!-- END TOP NAVIGATION BAR -->
开发者ID:claremontdesign,项目名称:zbase,代码行数:31,代码来源:header.blade.php
示例4: zbase_api_url
/**
* 'url' => '/api/{username}/{key}/{format}/{module}/{object}/{method}/{paramOne?}/{paramTwo?}/{paramThree?}/{paramFour?}/{paramFive?}/{paramSix?}',
* Create an API URL
* @param array $params
* @return string
*/
function zbase_api_url($params)
{
$array = [];
$array['username'] = !empty($params['username']) ? $params['username'] : 'username';
$array['key'] = !empty($params['key']) ? $params['key'] : 'key';
$array['format'] = !empty($params['format']) ? $params['format'] : 'json';
$array['module'] = !empty($params['module']) ? $params['module'] : null;
$array['object'] = !empty($params['object']) ? $params['object'] : null;
$array['method'] = !empty($params['method']) ? $params['method'] : null;
$array['paramOne'] = !empty($params['paramOne']) ? $params['paramOne'] : null;
$array['paramTwo'] = !empty($params['paramTwo']) ? $params['paramTwo'] : null;
$array['paramThree'] = !empty($params['paramThree']) ? $params['paramThree'] : null;
$array['paramFour'] = !empty($params['paramFour']) ? $params['paramFour'] : null;
$array['paramFive'] = !empty($params['paramFive']) ? $params['paramFive'] : null;
$array['paramSix'] = !empty($params['paramSix']) ? $params['paramSix'] : null;
return zbase_url_from_route('api', $array);
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:23,代码来源:url.php
示例5: zbase_url_from_route
</head>
<body ui-prevent-touchmove-defaults>
<?php
if (zbase_auth_has()) {
?>
<!-- Sidebars -->
<div ng-include="'<?php
echo zbase_url_from_route('admin-angular-mobile-sidebar');
?>
?at=1'"
ui-track-as-search-param='true'
class="sidebar sidebar-left"></div>
<div ng-include="'<?php
echo zbase_url_from_route('admin-angular-mobile-sidebar-right');
?>
?at=1'"
class="sidebar sidebar-right"></div>
<div class="app"
ui-swipe-right='Ui.turnOn("uiSidebarLeft")'
ui-swipe-left='Ui.turnOff("uiSidebarLeft")'>
<!-- Navbars -->
<div class="navbar navbar-app navbar-absolute-top">
<div class="navbar-brand navbar-brand-center" ui-yield-to="title">
<% viewTitle %>
</div>
<div class="btn-group pull-left">
<div ui-toggle="uiSidebarLeft" class="btn sidebar-toggle">
开发者ID:claremontdesign,项目名称:zbase,代码行数:31,代码来源:layout.blade.php
示例6: zbase_view_render
* $code = The Code
*
* /account/email/verify?e=email&c=$code
* zbase_url_from_route('account', ['action' => 'email','task' => 'verify','e' => $newEmailAddress,'c' => $code])
*/
?>
<?php
echo zbase_view_render(zbase_view_file_contents('email.header'));
?>
<h1>Email Address verification</h1>
<p>To be able to continue, we need to verify your email address
<br />
Email Address: <?php
echo $newEmailAddress;
?>
Code: <strong><?php
echo $code;
?>
</strong>
<br />
<br />
<a href="<?php
echo zbase_url_from_route('account', ['action' => 'email', 'task' => 'verify', 'e' => $newEmailAddress, 'c' => $code]);
?>
">Click here</a> to verify your email address.
</p>
<?php
echo zbase_view_render(zbase_view_file_contents('email.footer'));
开发者ID:claremontdesign,项目名称:zbase,代码行数:31,代码来源:newEmailAddressVerification.blade.php
示例7: imageUrl
/**
* Return the image url
*
* @return string
*/
public function imageUrl($options = [])
{
$fullImage = false;
$params = ['node' => static::$nodeNamePrefix];
if ($this->singleImage) {
$params['id'] = $this->alphaId();
} else {
$params['id'] = $this->imageId();
}
if (empty($options) || !empty($options['full'])) {
$fullImage = true;
}
$params['w'] = !empty($options['w']) ? $options['w'] : 150;
$params['h'] = !empty($options['h']) ? $options['h'] : 0;
$params['q'] = !empty($options['q']) ? $options['q'] : 80;
if (!empty($options['thumbnail'])) {
$params['w'] = !empty($options['w']) ? $options['w'] : 200;
$params['h'] = !empty($options['h']) ? $options['h'] : 0;
$params['q'] = !empty($options['q']) ? $options['q'] : 80;
}
$params['ext'] = zbase_config_get('node.files.image.format', 'png');
return zbase_url_from_route('nodeImage', $params);
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:28,代码来源:Node.php
示例8: zbase_url_from_route
<?php
/**
* Dx
*
* @link http://dennesabing.com
* @author Dennes B Abing <[email protected]>
* @license proprietary
* @copyright Copyright (c) 2015 ClaremontDesign/MadLabs-Dx
* @version 0.0.0.1
* @since Apr 1, 2016 10:21:39 PM
* @file msgbutton.blade.php
* @project Expression project.name is undefined on line 13, column 15 in Templates/Scripting/EmptyPHP.php.
* @package Expression package is undefined on line 14, column 15 in Templates/Scripting/EmptyPHP.php.
*/
?>
<!--<div class="alert alert-danger">Are you sure you want to delete?</div>-->
<div class="btn-group" role="group" aria-label="Message buttons">
<button type="button" class="btn btn-danger btn-sm zbase-btn-action-confirm"
data-config="{url: '<?php
echo zbase_url_from_route('messages', array('action' => 'trash', 'id' => $msg->alphaId()));
?>
',
mode: 'yesno',
message: 'Are you sure you want to delete this message?',
}">Delete</button>
</div>
开发者ID:claremontdesign,项目名称:zbase,代码行数:27,代码来源:msgbutton.blade.php
示例9: postFileUrl
/**
* Url to a file
*
* @return string
*/
public function postFileUrl($file = null, $action = 'view', $options = [])
{
if (method_exists($this, 'fileUrl')) {
return $this->fileUrl($file, $action, $options);
}
$task = null;
if (is_object($file) && !empty($file->name)) {
$task = $file->name;
}
if (is_object($file) && !empty($file->filename)) {
$task = $file->filename;
}
if (is_string($file)) {
$task = $file;
}
$action = str_replace('file-', '', $action);
if ($action != 'delete') {
// if(!empty($options['thumbnail']))
// {
// $width = 100;
// $height = 100;
// $task = '100x100_' . $task;
// }
// $width = !empty($options['w']) ? $options['w'] : (!empty($width) ? $width : null);
// $height = !empty($options['h']) ? $options['h'] : (!empty($height) ? $height : null);
}
if (zbase_auth_user()->isAdmin()) {
return zbase_url_from_route('admin.file', ['table' => $this->postTableName(), 'action' => $action, 'id' => $this->postId(), 'file' => $task]);
} else {
return zbase_url_from_route('file', ['table' => $this->postTableName(), 'action' => $action, 'id' => $this->postId(), 'file' => $task]);
}
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:37,代码来源:Post.php
示例10: actionUrl
/**
* Return this URL for Action
*/
public function actionUrl($action, $task = null)
{
$params = ['action' => $action, 'task' => $task];
$params['id'] = $this->alphaId();
if (zbase_is_back()) {
return zbase_url_from_route('admin.' . $this->actionUrlRouteName(), $params);
}
return zbase_url_from_route($this->actionUrlRouteName(), $params);
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:12,代码来源:File.php
示例11: zbase_view_render_body
/**
* Render HTML before </body>
*
* @return string
*/
function zbase_view_render_body()
{
$str = '';
zbase()->view()->prepare();
$onloadScripts = zbase_view_placeholder_render('body_scripts_onload');
$str .= zbase_view_placeholder_render('body_javascripts');
$str .= zbase_view_placeholder_render('body_footer_html');
$str .= EOF . '<script type="text/javascript">';
$str .= EOF . zbase_view_compile(zbase_view_placeholder_render('body_scripts'));
if (!empty(zbase_auth_is_duplex())) {
$onloadScripts .= 'jQuery(\'body\').append(\'<div style="margin:0px auto;z-index:999999;background:yellow;width: auto;position:absolute;top:0px;padding:5px;margin-top:2px;margin-left:2px;">You are loggedin as: ' . zbase_auth_user()->displayFullDetails() . ' <a class="btn btn-danger btn-sm" href="' . zbase_url_from_route('admin.duplex', ['action' => 'unduplex']) . '">SignOut</a></div>\');';
}
if (!empty($onloadScripts)) {
$str .= EOF . 'jQuery(document).ready(function(){' . EOF . $onloadScripts . EOF . '});';
}
$str .= EOF . '</script>';
return $str;
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:23,代码来源:view.php
示例12: zbase_url_from_route
if (zbase()->system()->inMaintenance()) {
?>
<div class="alert alert-danger text-center">
<a href="<?php
echo zbase_url_from_route('admin.system', ['action' => 'maintenance-mode-off']);
?>
" class="btn btn-danger">Stop Maintenance Mode</a>
<br />
<br />
Website is currently in <strong>maintenance mode</strong>.
</div>
<?php
} else {
?>
<div class="alert alert-info text-center">
<a href="<?php
echo zbase_url_from_route('admin.system', ['action' => 'maintenance-mode-on']);
?>
" class="btn btn-info">Set to Maintenance Mode</a>
<br />
<br />
When <strong>maintenance mode</strong> is enabled,<br />
a maintenance message will be displayed when someone accesses the site.
Your current IP Address of <strong><?php
echo zbase_ip();
?>
</strong> will be excluded.
</div>
<?php
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:30,代码来源:maintenance-button.blade.php
示例13: src
/**
* The Image
*/
public function src()
{
return zbase_url_from_route('siteImageWatermark', ['f' => $this->filename]);
}
开发者ID:dennesabing,项目名称:zivsluck,代码行数:7,代码来源:Image.php
示例14: zbase_url_from_route
<!-- BEGIN SIDEBAR -->
<div class="page-sidebar navbar-collapse collapse">
<!-- BEGIN SIDEBAR MENU -->
<ul class="page-sidebar-menu" data-auto-scroll="true" data-slide-speed="200">
<li class="sidebar-toggler-wrapper">
<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
<div class="sidebar-toggler hidden-phone">
</div>
<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
</li>
<li class="start ">
<a href="<?php
echo zbase_url_from_route('admin');
?>
">
<i class="fa fa-home"></i>
<span class="title">
Dashboard
</span>
</a>
</li>
<?php
$modules = zbase()->modules();
$navs = [];
foreach ($modules as $module) {
if ($module->hasNavigation(zbase_section())) {
$navs[] = $module;
}
}
$navs = zbase_collection($navs)->sortByDesc(function ($itm) {
return $itm->getNavigationOrder();
开发者ID:claremontdesign,项目名称:zbase,代码行数:31,代码来源:sidebar.blade.php
示例15: updateRequestEmailAddress
/**
* First step in updating email address.
* - Code will be sent to the old email address with a verification code
* @param string $newEmailAddress
* @return boolean
*/
public function updateRequestEmailAddress($newEmailAddress)
{
if (!empty($newEmailAddress) && $this->email() != $newEmailAddress) {
zbase_db_transaction_start();
try {
/**
* Admin is changing the email Address
*/
if (zbase_auth_user()->id() != $this->id() && zbase_auth_user()->isAdmin()) {
/**
* Send a request code to the old email address
* option: email_verification_code: code; new_email: $newEmail Address
*/
$oldEmail = $this->email();
$this->email = $newEmailAddress;
$this->email_verified = 0;
$this->save();
zbase_alert('info', _zt($this->displayFullDetails() . ' email address was updated to <strong>%email%</strong> from <strong>' . $oldEmail . '</strong>.', ['%email%' => $this->email()]));
$this->log('user::updateRequestEmailAddress', null, ['new_email' => $newEmailAddress, 'admin_id' => zbase_auth_user()->id()]);
} else {
/**
* Send a request code to the old email address
* option: email_verification_code: code; new_email: $newEmail Address
*/
$code = zbase_generate_code();
$this->setDataOption('email_updaterequest_code', $code);
$this->setDataOption('email_new', $newEmailAddress);
$this->setDataOption('email_new_request_date', zbase_date_now());
$this->save();
$url = zbase_url_from_route('update-email-request', ['email' => $this->email(), 'token' => $code]);
$urlText = null;
if (zbase_is_dev()) {
$urlText = '<a href="' . $url . '">' . $url . '</a>';
zbase()->json()->setVariable('updateRequestEmailAddress', $url);
}
zbase_alert('info', _zt('We sent an email to %email% with a link to complete the process of updating your email address.' . $urlText, ['%email%' => $this->email()]));
zbase_messenger_email($this->email(), 'account-noreply', _zt('New Email address update request'), zbase_view_file_contents('email.account.newEmailAddressRequest'), ['entity' => $this, 'newEmailAddress' => $newEmailAddress, 'code' => $code, 'url' => $url]);
$this->log('user::updateRequestEmailAddress', null, ['new_email' => $newEmailAddress]);
}
zbase_db_transaction_commit();
return true;
} catch (\Zbase\Exceptions\RuntimeException $e) {
zbase_db_transaction_rollback();
return false;
}
} else {
zbase_alert('info', _zt('We sent an email to %email% with a link to complete the process of updating your email address.', ['%email%' => $this->email()]));
}
}
开发者ID:claremontdesign,项目名称:zbase,代码行数:55,代码来源:User.php
示例16: zbase_url_from_route
@extends(zbase_view_template_layout())
@section('content')
Site Index
| <a href="<?php
echo zbase_url_from_route('admin');
?>
">Admin</a>
| <a href="<?php
echo zbase_url_from_route('login');
?>
">Login</a>
| <a href="<?php
echo zbase_url_from_route('register');
?>
">Register</a>
@stop
开发者ID:claremontdesign,项目名称:zbase,代码行数:16,代码来源:index.blade.php
示例17: function
<?php
/**
* Dx
*
* @link http://dennesabing.com
* @author Dennes B Abing <[email protected]>
* @license proprietary
* @copyright Copyright (c) 2015 ClaremontDesign/MadLabs-Dx
* @version 0.0.0.1
* @since Mar 5, 2016 11:51:42 PM
* @file module.php
* @project Expression project.name is undefined on line 13, column 15 in Templates/Scripting/EmptyPHP.php.
* @package Expression package is undefined on line 14, column 15 in Templates/Scripting/EmptyPHP.php.
*
*/
return ['id' => 'angular', 'enable' => false, 'access' => 'admin', 'class' => null, 'backend' => false, 'frontend' => false, 'url' => ['backend' => 'a-{action?}'], 'routes' => ['angular-js' => ['url' => 'admin/zbase-angular.js', 'view' => ['enable' => true, 'layout' => 'blank', 'name' => 'type.js', 'content' => function () {
return zbase_view_render(zbase_view_file_module('angular.views.back.mobile.js'));
}]], 'admin-angular-mobile-sidebar' => ['backend' => true, 'url' => 'admin/mobile/angular/sidebar.html', 'view' => ['enable' => true, 'layout' => 'blank', 'name' => 'type.html', 'content' => function () {
return zbase_view_render(zbase_view_file_module('angular.views.back.mobile.templates.sidebar'));
}], 'middleware' => ['admin' => true]], 'admin-angular-mobile-sidebar-right' => ['backend' => true, 'url' => 'admin/mobile/angular/sidebar-right.html', 'view' => ['enable' => true, 'layout' => 'blank', 'name' => 'type.html', 'content' => function () {
return zbase_view_render(zbase_view_file_module('angular.views.back.mobile.templates.sidebar-right'));
}], 'middleware' => ['admin' => true]], 'admin-angular-mobile-dashboard-template' => ['backend' => true, 'url' => 'admin/mobile/angular/dashboard.html', 'view' => ['enable' => true, 'layout' => 'blank', 'name' => 'type.html', 'content' => function () {
return zbase_view_render(zbase_view_file_module('angular.views.back.mobile.templates.dashboard'));
}], 'middleware' => ['admin' => true]]], 'angular' => ['mobile' => ['backend' => ['routeProvider' => [['url' => '/', 'templateUrl' => function () {
return zbase_url_from_route('admin-angular-mobile-dashboard-template', [], true);
}, 'controller' => 'adminDashboardController']], 'controllers' => [['controller' => 'adminDashboardController', 'view' => ['file' => function () {
return zbase_view_render(zbase_view_file_module('angular.views.back.mobile.controllers.adminDashboardController'));
}]]]]]], 'widgets' => ['back' => ['controller' => ['action' => []]]]];
开发者ID:claremontdesign,项目名称:zbase,代码行数:29,代码来源:module.php
示例18: function
<?php
/**
* Dx
*
* @link http://dennesabing.com
* @author Dennes B Abing <[email protected]>
* @license proprietary
* @copyright Copyright (c) 2015 ClaremontDesign/MadLabs-Dx
* @version 0.0.0.1
* @since Mar 8, 2016 10:37:59 AM
* @file widget.php
* @project Expression project.name is undefined on line 13, column 15 in Templates/Scripting/EmptyPHP.php.
* @package Expression package is undefined on line 14, column 15 in Templates/Scripting/EmptyPHP.php.
*
*/
return ['type' => 'form', 'enable' => true, 'config' => ['access' => 'only::sudo', 'values' => ['default' => ['enable' => true, 'array' => function () {
return zbase()->telegram()->settings();
}]], 'entity' => null, 'elements' => ['status' => ['type' => 'select', 'id' => 'status', 'label' => 'Status', 'multiOptions' => 'enableDisable', 'help' => ['text' => 'Disable telegram messaging.']], 'botusername' => ['type' => 'text', 'id' => 'botusername', 'label' => 'Bot Name', 'html' => ['attributes' => ['input' => ['placeholder' => 'Bot Username']]]], 'bottoken' => ['type' => 'text', 'id' => 'bottoken', 'label' => 'Bot Token', 'html' => ['attributes' => ['input' => ['placeholder' => 'Bot Token']]]], 'webhook' => ['type' => 'text', 'id' => 'webhook', 'label' => 'WebHook (Optional)', 'html' => ['attributes' => ['input' => ['value' => function () {
$token = zbase()->telegram()->token();
if (!empty($token)) {
return zbase_url_from_route('telegramhook', ['token' => $token]);
}
}, 'placeholder' => 'Webhook']]]], 'testmessage' => ['type' => 'select', 'id' => 'testmessage', 'label' => 'Send Test Message', 'multiOptions' => 'yesNo', 'help' => ['text' => 'Will send test message to Dennes.']]]]];
开发者ID:claremontdesign,项目名称:zbase,代码行数:24,代码来源:telegram-settings-form.php
示例19: zbase_url_from_route
<p>
<img src="/zbase/assets/zivsluck/img/promo/100off.png" alt="100.00 Off on your next order" class="img-shadow img-responsive">
</p>
<p>
<br />
To avail of the 100.00 discount on your next order:
<ul>
<li>Complete your first order.</li>
<li>Next order should be of the same material as the first order.</li>
<li>First Name and Last Name should be the same from the first order.</li>
<li>Next order should be delivered on the same address as the first order.</li>
<li>Next order should be completed within the day or in the next 24 hours since the first order was made.</li>
<li>Discount can only be used on the next order.</li>
<li>Discount will be reflected on the Order Confirmation page.</li>
<li>If discount was already used, you can get another 100.00 discount by completing another order.</li>
<li>For the discounted order to be processed, payment for the first and the discounted order should be completed.</li>
<li><strong>No Payment, no Processing of Order</strong>.</li>
</ul>
</p>
<p> </p>
<p><a class="btn btn-success btn-next" href="<?php
echo zbase_url_from_route('customize');
?>
">Create your order now!</a></p>
<p> </p>
开发者ID:dennesabing,项目名称:zivsluck,代码行数:25,代码来源:index.blade.php
示例20: imageSrc
/**
* Return the Image Src
* @return string
*/
public function imageSrc($task = null)
{
$id = $this->maskedId();
return zbase_url_from_route('order', compact('id', 'task'));
}
开发者ID:dennesabing,项目名称:zivsluck,代码行数:9,代码来源:Order.php
注:本文中的zbase_url_from_route函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论