本文整理匯總了PHP中yii\helpers\Html::link方法的典型用法代碼示例。如果您正苦於以下問題:PHP Html::link方法的具體用法?PHP Html::link怎麽用?PHP Html::link使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類yii\helpers\Html
的用法示例。
在下文中一共展示了Html::link方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
<div class="view">
<b><?php
echo \yii\helpers\Html::encode($data->getAttributeLabel('num'));
?>
:</b>
<?php
echo \yii\helpers\Html::link(\yii\helpers\Html::encode($data->num), array('view', 'id' => $data->num));
?>
<br />
<b><?php
echo \yii\helpers\Html::encode($data->getAttributeLabel('name'));
?>
:</b>
<?php
echo \yii\helpers\Html::encode($data->company);
?>
<br />
<b><?php
echo \yii\helpers\Html::encode($data->getAttributeLabel('type'));
?>
:</b>
<?php
echo \yii\helpers\Html::encode($data->type);
?>
<br />
<b><?php
echo \yii\helpers\Html::encode($data->getAttributeLabel('id6111'));
示例2: array
<?php
$this->params["breadcrumbs"] = array('Bank Names' => array('index'), 'Manage');
$this->params["menu"] = array(array('label' => 'List BankName', 'url' => array('index')), array('label' => 'Create BankName', 'url' => array('create')));
?>
<h1>Manage Bank Names</h1>
<p>
You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b>
or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.
</p>
<?php
echo \yii\helpers\Html::link('Advanced Search', '#', array('class' => 'search-button btn'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
echo app\widgets\GridView::widget(array('id' => 'bank-name-grid', 'dataProvider' => $model->dp(), 'columns' => array('id', 'name', array('class' => 'yii\\grid\\ActionColumn'))));
示例3:
<p>
Questo messaggio contiene una password a singolo utilizzo.<br>
É stata inviata da <?php
echo \yii\helpers\Html::link(Yii::$app->name, $siteUrl);
?>
. Se non avete eseguito voi la richiesta ignorate questa mail o contattate l'amministratore.
</p>
<p>Inserite il seguente codice nella pagina dai cui è stato richiesto:</p>
<h3><?php
echo $code;
?>
</h3>