本文整理汇总了PHP中yii\helpers\BaseUrl::current方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseUrl::current方法的具体用法?PHP BaseUrl::current怎么用?PHP BaseUrl::current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\helpers\BaseUrl
的用法示例。
在下文中一共展示了BaseUrl::current方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderMenu
protected function renderMenu()
{
$html = [];
$html[] = '<div class="list-group">';
foreach ($this->items as $item) {
if (BaseUrl::current() == $item['url']) {
$html[] = $this->renderActiveItem($item);
} else {
$html[] = $this->renderItem($item);
}
}
$html[] = '</div>';
return implode($html);
}
示例2:
}
?>
<div class="form-group">
<label>Status</label>
<p><span class="event <?php
echo Yii::$app->AgobUtils->cssStatus($model->status, $model->d_ter);
?>
"></span><?php
echo Yii::$app->params['status'][$model->status];
?>
</p>
</div>
<form action="<?php
echo \yii\helpers\BaseUrl::current();
?>
" method="POST">
<?php
if (Yii::$app->user->can('Administrador')) {
?>
<div class="form-group">
<label>Observação</label>
<textarea name="Eventos[status_observacao]" class="form-control" rows="5"><?php
echo $model->status_observacao;
?>
</textarea>
</div>
<?php
if (Yii::$app->user->can('Administrador')) {
?>
示例3:
echo BaseUrl::to(['contacts/edit', 'id' => $contact['idContact']]);
?>
">
<button class="view">view</button>
</a>
<a class="editLink" href="<?php
echo BaseUrl::to(['contacts/edit', 'id' => $contact['idContact']]);
?>
">
<button class="edit">edit</button>
</a>
</td>
<td class="lastCol" >
<?php
$href = BaseUrl::to(['contacts/delete', 'id' => $contact['idContact']]);
$hrefPage = BaseUrl::current(['page' => $page, 'orderBy' => $orderBy, 'dir' => $dirOpposite, 'sortChange' => $sortChange]);
$onclickDelete = "name='" . $contact['lastName'] . ' ' . $contact['firstName'] . "' " . "href='" . $href . "'" . "hrefPage='" . $hrefPage . "'" . "row='" . $i . "'";
?>
<button class="delete" <?php
echo $onclickDelete;
?>
>X</button>
</td>
</tr>
<?php
$num++;
}
?>
<tr class="lastRow">
<td class="bottomLeft number"></td>
<td class="lastName"></td>