本文整理汇总了PHP中Router::generateURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Router::generateURL方法的具体用法?PHP Router::generateURL怎么用?PHP Router::generateURL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Router
的用法示例。
在下文中一共展示了Router::generateURL方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: back
public function back($url)
{
$buffer = EMPTYSTRING;
$buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-primary btn-sm">';
$buffer .= '<i class="fa fa-backward"></i> ';
$buffer .= BackendTranslate::getLabel(BACK);
$buffer .= '</a>';
return $buffer;
}
示例2: back
public function back($url)
{
$buffer = EMPTYSTRING;
$buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-primary btn-sm">';
$buffer .= '<span class="glyphicon glyphicon-backward" aria-hidden="true"></span> ';
$buffer .= ButtonsTranslate::getLabel(BACK);
$buffer .= '</a>';
return $buffer;
}
示例3: visible
public function visible($url, $online)
{
$buffer = EMPTYSTRING;
if ($online == 1) {
$buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-xs btn-' . SUCCESS . '">';
} else {
$buffer .= '<a href="' . Router::generateURL($url) . '" class="btn btn-xs btn-' . DANGER . '">';
}
$buffer .= '<span class="glyphicon glyphicon-refresh"></span> ';
if ($online == 1) {
$buffer .= BackendTranslate::getLabel('show');
} else {
$buffer .= BackendTranslate::getLabel('hide');
}
$buffer .= '</a> | ';
return $buffer;
}
示例4: redirect
function redirect($url, $code = null)
{
if ($code == 301) {
header("HTTP/1.1 301 Moved Permanently");
}
header("Location: " . Router::generateURL($url));
}
示例5:
<li class="active">
<?php
echo BackendTranslate::getLabel(DELETE);
?>
</li>
</ol>
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php
echo BackendTranslate::getLabel('info_delete');
?>
</div>
<form action="<?php
echo Router::generateURL('cockpit/ranking/delete/' . $id);
?>
" method="post" class="form-horizontal">
<?php
echo $this->FormField->hidden('id');
?>
<?php
echo $this->FormField->hidden('updated');
?>
<?php
echo $this->FormField->hidden('updater');
?>
<?php
echo $this->FormField->hidden('online');
?>
<div class="panel panel-danger">
示例6: foreach
<td style="width:23%;" class="text-right">
<?php
echo $this->FormLink->add('cockpit/coach/add');
?>
</td>
</tr>
</thead>
<tbody>
<?php
foreach ($Coach as $k => $v) {
?>
<?php
echo $v->logical_delete == 1 ? '<tr class="danger">' : '<tr>';
?>
<td style="text-align: center;"><a href="<?php
echo Router::generateURL('cockpit/coach/online/' . $v->id);
?>
" class="label label-<?php
echo $v->online == 1 ? SUCCESS : DANGER;
?>
"><?php
echo $v->online == 1 ? BackendTranslate::getLabel('yes') : BackendTranslate::getLabel('no');
?>
</a></td>
<td><?php
echo truncateStringWords($v->coach, 75);
?>
</td>
<td><?php
echo $v->team;
?>
示例7:
?>
</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<?php
echo $this->Session->getAlert();
?>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<form action="<?php
echo Router::generateURL('cockpit/blogtrip/add');
?>
" method="post" class="form-horizontal">
<?php
echo $this->FormField->hidden('creation');
echo $this->FormField->hidden('updated');
echo $this->FormField->hidden('updater');
echo $this->FormField->hidden('logical_delete');
?>
<div class="panel panel-info">
<div class="panel-heading">
<span class="glyphicon glyphicon-plus"></span> <?php
echo BackendTranslate::getLabel(ADD);
?>
</div>
示例8: image
public function image($name)
{
$value = isset($this->controller->request->data->{$name}) ? stripslashes($this->controller->request->data->{$name}) : EMPTYSTRING;
$buffer = EMPTYSTRING;
$buffer .= $this->init($name);
if (!empty($value)) {
$buffer .= '<img src="' . Router::generateURL($value) . '" width="130px"/>';
} else {
$buffer .= '<input type="text" value="Aucune image de définie" ' . $this->readonly(true) . ' class="form-control">';
}
$buffer .= $this->end($name);
return $buffer;
}
示例9:
$title_for_layout = DashboardTranslate::getLabel('help');
?>
<h1 class="page-header">
<?php
echo DashboardTranslate::getLabel('help');
?>
</h1>
<ol class="breadcrumb">
<li>
<?php
echo MenuTranslate::getLabel(PLACE);
?>
<a href="<?php
echo Router::generateURL(COCKPIT);
?>
"><?php
echo MenuTranslate::getLabel(HOME);
?>
</a>
</li>
<li class="active">
<?php
echo DashboardTranslate::getLabel('list');
?>
</li>
</ol>
<div class="alert alert-primary alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
示例10:
<ol class="breadcrumb">
<li>
<?php
echo BackendTranslate::getLabel(PLACE);
?>
<a href="<?php
echo Router::generateURL(COCKPIT);
?>
"><?php
echo BackendTranslate::getLabel(HOME);
?>
</a>
</li>
<li>
<a href="<?php
echo Router::generateURL('cockpit/bloghealth');
?>
"><?php
echo BackendTranslate::getLabel('bloghealth');
?>
</a>
</li>
<li class="active">
<?php
echo BackendTranslate::getLabel(LISTING);
?>
</li>
</ol>
</div>
</div>
<div class="row">
示例11:
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php
echo BackendTranslate::getLabel('info_delete');
?>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<form action="<?php
echo Router::generateURL('cockpit/blogbeauty/delete/' . $id);
?>
" method="post" class="form-horizontal">
<?php
echo $this->FormField->hidden('id');
echo $this->FormField->hidden('updated');
echo $this->FormField->hidden('updater');
echo $this->FormField->hidden('online');
?>
<div class="panel panel-danger">
<div class="panel-heading">
<span class="glyphicon glyphicon-remove"></span> <?php
echo BackendTranslate::getLabel(DELETE);
?>
</div>
<div class="panel-body">
示例12:
<ol class="breadcrumb">
<li>
<?php
echo BackendTranslate::getLabel(PLACE);
?>
<a href="<?php
echo Router::generateURL(COCKPIT);
?>
"><?php
echo BackendTranslate::getLabel(HOME);
?>
</a>
</li>
<li>
<a href="<?php
echo Router::generateURL('cockpit/blogcat');
?>
"><?php
echo BackendTranslate::getLabel('blog_category');
?>
</a>
</li>
<li class="active">
<?php
echo BackendTranslate::getLabel(DELETE);
?>
</li>
</ol>
</div>
</div>
<div class="row">
示例13: foreach
<td style="width:23%;" class="text-right">
<?php
echo $this->FormLink->add('cockpit/urgency/add');
?>
</td>
</tr>
</thead>
<tbody>
<?php
foreach ($Urgency as $k => $v) {
?>
<?php
echo $v->logicaldelete == 1 ? '<tr class="danger">' : '<tr>';
?>
<td style="text-align: center;"><a href="<?php
echo Router::generateURL('cockpit/urgency/online/' . $v->id);
?>
" class="label label-<?php
echo $v->online == 1 ? SUCCESS : DANGER;
?>
"><?php
echo $v->online == 1 ? ButtonsTranslate::getLabel('yes') : ButtonsTranslate::getLabel('no');
?>
</a></td>
<td><?php
echo $v->name;
?>
</td>
<td><?php
echo $v->phone;
?>
示例14:
<li class="active">
<?php
echo UserTranslate::getLabel(DELETE);
?>
</li>
</ol>
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<?php
echo UserTranslate::getLabel('infodel');
?>
</div>
<form action="<?php
echo Router::generateURL('cockpit/user/delete/' . $id);
?>
" method="post" class="form-horizontal">
<?php
echo $this->FormField->hidden('id');
?>
<?php
echo $this->FormField->hidden('updated');
?>
<?php
echo $this->FormField->hidden('updater');
?>
<div class="panel panel-danger">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> <?php
echo UserTranslate::getLabel(DELETE);
示例15:
<div class="row">
<div class="col-lg-12">
<h1><?php
echo FrontendTranslate::getLabel('contact');
?>
</h1>
</div>
</div>
<div class="row">
<div class="col-lg-6">
<form role="form" action="<?php
echo Router::generateURL('page/contact_form');
?>
" method="post">
<div class="form-group">
<div class="input-group">
<input type="text" class="form-control" placeholder="Les champs requis se terminent par" required disabled>
<span class="input-group-addon"><span class="glyphicon glyphicon-check"></span></span>
</div>
</div>
<div class="form-group">
<label for="InputName"><?php
echo FrontendTranslate::getLabel('name');
?>
</label>
<div class="input-group">
<input type="text" class="form-control" name="InputName" id="InputName" placeholder="<?php
echo FrontendTranslate::getLabel('name_required');
?>
" required>