本文整理匯總了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>