本文整理匯總了PHP中GxHtml::encode方法的典型用法代碼示例。如果您正苦於以下問題:PHP GxHtml::encode方法的具體用法?PHP GxHtml::encode怎麽用?PHP GxHtml::encode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GxHtml
的用法示例。
在下文中一共展示了GxHtml::encode方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
:
<?php
echo GxHtml::encode($data->status);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('user_id'));
?>
:
<?php
echo GxHtml::encode(GxHtml::valueEx($data->user));
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('create_time'));
?>
:
<?php
echo GxHtml::encode($data->create_time);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('update_time'));
?>
:
<?php
echo GxHtml::encode($data->update_time);
?>
<br />
</div>
示例2: array
<?php
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Manage'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('user-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
$this->menu = array(array('label' => Yii::t('app', 'Manage') . ' ' . $model->label(2), 'url' => array('admin')));
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('createAdmin'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'active' => true, 'linkOptions' => array('class' => 'search-button')), array('label' => 'Export to PDF', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GeneratePdf'), 'linkOptions' => array('target' => '_blank'), 'visible' => true), array('label' => 'Export to Excel', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GenerateExcel'), 'linkOptions' => array('target' => '_blank'), 'visible' => true))));
$this->endWidget();
?>
<h3><?php
echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2));
?>
</h3>
<?php
echo GxHtml::link(Yii::t('app', 'Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style='display:none'>
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'user-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array('id', 'username', 'status', array('class' => 'CButtonColumn'))));
示例3:
echo $form->textArea($model, 'slogan_en');
?>
<?php
echo $form->error($model, 'slogan_en');
?>
</div><!-- row -->
<div class="row">
<?php
echo $form->labelEx($model, 'slogan_ar');
?>
<?php
echo $form->textArea($model, 'slogan_ar');
?>
<?php
echo $form->error($model, 'slogan_ar');
?>
</div><!-- row -->
<label><?php
echo GxHtml::encode($model->getRelationLabel('distributions'));
?>
</label>
<?php
echo $form->checkBoxList($model, 'distributions', GxHtml::encodeEx(GxHtml::listDataEx(Distribution::model()->findAllAttributes(null, true)), false, true));
?>
<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'));
$this->endWidget();
?>
</div><!-- form -->
示例4:
:
<?php
echo GxHtml::encode($data->action_date);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('deleted_at'));
?>
:
<?php
echo GxHtml::encode($data->deleted_at);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('parameters'));
?>
:
<?php
echo GxHtml::encode($data->parameters);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('result'));
?>
:
<?php
echo GxHtml::encode($data->result);
?>
<br />
</div>
示例5: array
<?php
$this->breadcrumbs = array(DistributionStatus::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Create') . ' ' . DistributionStatus::label(), 'url' => array('create')), array('label' => Yii::t('app', 'Manage') . ' ' . DistributionStatus::label(2), 'url' => array('admin')));
?>
<h1><?php
echo GxHtml::encode(DistributionStatus::label(2));
?>
</h1>
<?php
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
示例6: printUnterstuetzerInnenWidget
/**
* @static
* @param $antrag Antrag|Aenderungsantrag
* @param $unterstuetzerIn_rel string
* @return string
*/
public static function printUnterstuetzerInnenWidget($antrag, $unterstuetzerIn_rel)
{
$neustr = '<div class="unterstuetzerInnenwidget_adder" style="margin-top: 20px;">';
/*
$neustr .= '<select name="' . get_class($antrag) . '[unterstuetzerIn_neu][person][]" class="person_selector">';
$neustr .= '<option value="neu"> - neue Person anlegen -</option>';
if ($antrag->getVeranstaltungsreihe()->getEinstellungen()->antrag_neu_nur_namespaced_accounts) {
$pers = Person::model()->findAllByAttributes(array("veranstaltungsreihe_namespace" => $antrag->getVeranstaltungsreihe()->id), array("order" => "name"));
} else {
$pers = Person::model()->findAllAttributes("name", true, array("order" => "name"));
}
foreach ($pers as $p) {
/* @var $p Person /
$neustr .= '<option value="' . $p->id . '">' . CHtml::encode($p->name) . '</option>';
}
$neustr .= "</select>";
* */
$neustr .= '<input type="hidden" name="' . get_class($antrag) . '[unterstuetzerIn_neu][person][]" value="neu">';
$neustr .= '<label style="display: inline-block; width: 220px;">';
$neustr .= 'Rolle:<br>';
$neustr .= '<select name="' . get_class($antrag) . '[unterstuetzerIn_neu][rolle][]" required>';
$neustr .= '<option value=""> - </option>';
foreach (IUnterstuetzerInnen::$ROLLEN as $key => $val) {
$neustr .= '<option value="' . $key . '">' . CHtml::encode($val) . "</option>\n";
}
$neustr .= '</select></label>';
$neustr .= '<label style="display: inline-block; width: 220px;" class="unterstuetzerIn_neu_holder">Personen-Typ:<br>';
$neustr .= "<select name='" . get_class($antrag) . "[unterstuetzerIn_neu][person_typ][]'>";
foreach (Person::$TYPEN as $key => $val) {
$neustr .= "<option value='{$key}'>" . GxHtml::encode($val) . "</option>\n";
}
$neustr .= "</select></label>";
$neustr .= "<label style='display: inline-block; width: 220px;'>Name:<br>";
$neustr .= "<input type='text' style='width: 187px;' name='" . get_class($antrag) . "[unterstuetzerIn_neu][person_name][]' value='' placeholder='Name'>";
$neustr .= '</label>';
$neustr .= "<label style='display: inline-block; width: 220px;'>Organisation (bei nat. P.):<br>";
$neustr .= "<input type='text' style='width: 187px;' name='" . get_class($antrag) . "[unterstuetzerIn_neu][person_organisation][]' value='' placeholder='KV, LAG, ...'>";
$neustr .= '</label>';
$neustr .= "<label style='display: inline-block; width: 220px;'>Beschlussdatum (bei jur. P.):<br>";
$neustr .= "<input type='text' style='width: 187px;' name='" . get_class($antrag) . "[unterstuetzerIn_neu][beschlussdatum][]' value='' placeholder='TT.MM.YYYY'>";
$neustr .= '</label>';
$neustr .= '</div>';
$str = '<div class="unterstuetzerInnenwidget" data-neutemplate="' . CHtml::encode($neustr) . '">';
$unterstuetzerInnen = $antrag->{$unterstuetzerIn_rel};
foreach ($unterstuetzerInnen as $unt) {
/** @var AntragUnterstuetzerInnen $unt */
$str .= '<div style="vertical-align: top;">';
$str .= '<span style="display: inline-block; width: 250px; overflow: hidden; vertical-align: top;" class="sort_handle">' . $unt->getNameMitBeschlussdatum(true) . '</span>';
$str .= '<input type="hidden" name="' . get_class($antrag) . '[unterstuetzerInnen][person_id][]" value="' . $unt->person->id . '">';
$str .= '<input type="hidden" name="' . get_class($antrag) . '[unterstuetzerInnen][beschlussdatum][]" value="' . CHtml::encode($unt->beschlussdatum) . '">';
$str .= '<select name="' . get_class($antrag) . '[unterstuetzerInnen][rolle][]" style="vertical-align: top;">';
$str .= '<option value="del"> - ' . Yii::t('app', 'löschen') . ' - </option>';
foreach (IUnterstuetzerInnen::$ROLLEN as $key => $val) {
$str .= '<option value="' . $key . '" ';
if ($unt->rolle == $key) {
$str .= "selected='selected'";
}
$str .= ">" . CHtml::encode($val) . "</option>\n";
}
$str .= '</select>';
$str .= '</div>';
}
$str .= '<div class="unterstuetzerInnenwidget_add_caller" style="margin-top: 20px;"><a href="#">Neue hinzufügen</a></div>';
$str .= "</div>";
return $str;
}
示例7: array
echo GxHtml::openTag('li');
echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('actor/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
echo GxHtml::closeTag('li');
}
echo GxHtml::closeTag('ul');
?>
<h2><?php
echo GxHtml::encode($model->getRelationLabel('categories'));
?>
</h2>
<?php
echo GxHtml::openTag('ul');
foreach ($model->categories as $relatedModel) {
echo GxHtml::openTag('li');
echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('category/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
echo GxHtml::closeTag('li');
}
echo GxHtml::closeTag('ul');
?>
<h2><?php
echo GxHtml::encode($model->getRelationLabel('inventories'));
?>
</h2>
<?php
echo GxHtml::openTag('ul');
foreach ($model->inventories as $relatedModel) {
echo GxHtml::openTag('li');
echo GxHtml::link(GxHtml::encode(GxHtml::valueEx($relatedModel)), array('inventory/view', 'id' => GxActiveRecord::extractPkValue($relatedModel, true)));
echo GxHtml::closeTag('li');
}
echo GxHtml::closeTag('ul');
示例8: array
<?php
$this->breadcrumbs = array($model->label(2) => array('index'), GxHtml::valueEx($model));
$this->menu = array(array('label' => Yii::t('app', 'Listar') . ' ' . $model->label(2), 'url' => array('index')), array('label' => Yii::t('app', 'Agregar') . ' ' . $model->label(), 'url' => array('create')), array('label' => Yii::t('app', 'Editar') . ' ' . $model->label(), 'url' => array('update', 'id' => $model->id)), array('label' => Yii::t('app', 'Borrar') . ' ' . $model->label(), 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->id), 'confirm' => 'Are you sure you want to delete this item?')), array('label' => Yii::t('app', 'Administrar') . ' ' . $model->label(2), 'url' => array('admin')));
?>
<h1><?php
echo GxHtml::encode($model->label()) . ' ' . GxHtml::encode(GxHtml::valueEx($model));
?>
</h1>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('ano', array('name' => 'Total Neto', 'value' => OrdenTrabajo::formatearPeso($model->ppto_anual)), array('name' => 'Total Neto', 'value' => OrdenTrabajo::formatearPeso($model->ppto_mensual)), 'creado', 'modificado')));
?>
示例9:
:
<?php
echo GxHtml::encode(GxHtml::valueEx($data->idagent0));
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('idvoucher'));
?>
:
<?php
echo GxHtml::encode(GxHtml::valueEx($data->idvoucher0));
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('useddate'));
?>
:
<?php
echo GxHtml::encode($data->useddate);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('givendate'));
?>
:
<?php
echo GxHtml::encode($data->givendate);
?>
<br />
</div>
示例10: array
<?php
$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Administrar'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('due-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>
<h1><?php
echo Yii::t('app', 'Administrar') . ' ' . GxHtml::encode($model->label(2));
?>
</h1>
<p>
Si lo desea, puede entrar en un operador de comparación (<, <=, >, >=, <> o =) al principio de cada uno de los valores de la búsqueda para especificar la forma en la comparación se debe hacer.
</p>
<?php
echo GxHtml::link(Yii::t('app', 'Búsqueda Avanzada'), '#', array('class' => 'search-button'));
?>
<div class="search-form">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'due-grid', 'dataProvider' => $model->search(), 'columns' => array('CODIGO', 'NOMBRE', 'BARRIO_VEREDA', 'DIRECCION', 'PRINCIPAL', array('class' => 'CButtonColumn', 'template' => '{update}', 'header' => 'Editar', 'updateButtonOptions' => array('title' => 'Actualizar'), 'updateButtonUrl' => 'Yii::app()->controller->createUrl("due/create",array("id"=>$data->iddue))'))));
示例11: array
<?php
$this->breadcrumbs = array(Due::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Crear') . ' ' . Due::label(), 'url' => array('create')), array('label' => Yii::t('app', 'Administrar') . ' ' . Due::label(2), 'url' => array('admin')));
?>
<h1><?php
echo GxHtml::encode(Due::label(2));
?>
</h1>
<?php
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
示例12: array
<?php
$this->breadcrumbs = array(IguProductCategory::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Manage') . ' ' . IguProductCategory::label(2), 'url' => array('admin')));
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('create'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'active' => true, 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'linkOptions' => array('class' => 'search-button')), array('label' => 'Export to PDF', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GeneratePdf'), 'linkOptions' => array('target' => '_blank'), 'visible' => true), array('label' => 'Export to Excel', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GenerateExcel'), 'linkOptions' => array('target' => '_blank'), 'visible' => true))));
$this->endWidget();
?>
<h3><?php
echo GxHtml::encode(IguProductCategory::label(2));
?>
</h3>
<?php
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
示例13:
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('NOMMUN'));
?>
:
<?php
echo GxHtml::encode($data->NOMMUN);
?>
<br />
<?php
echo GxHtml::encode($data->getAttributeLabel('ANEXO6A_CONSECUTIVO'));
?>
:
<?php
echo GxHtml::encode($data->ANEXO6A_CONSECUTIVO);
?>
<br />
<?php
/*
<?php echo GxHtml::encode($data->getAttributeLabel('ANEXO6A_ANO_CORTE')); ?>:
<?php echo GxHtml::encode($data->ANEXO6A_ANO_CORTE); ?>
<br />
<?php echo GxHtml::encode($data->getAttributeLabel('ANEXO6A_MES_CORTE')); ?>:
<?php echo GxHtml::encode($data->ANEXO6A_MES_CORTE); ?>
<br />
<?php echo GxHtml::encode($data->getAttributeLabel('CODIGO_SED')); ?>:
<?php echo GxHtml::encode($data->CODIGO_SED); ?>
<br />
<?php echo GxHtml::encode($data->getAttributeLabel('DPTO_CARGA')); ?>:
<?php echo GxHtml::encode($data->DPTO_CARGA); ?>
示例14: array
<?php
$this->breadcrumbs = array(Category::label(2), 'Index');
$this->menu = array(array('label' => 'Create' . ' ' . Category::label(), 'url' => array('create')), array('label' => 'Manage' . ' ' . Category::label(2), 'url' => array('admin')));
?>
<h1><?php
echo GxHtml::encode(Category::label(2));
?>
</h1>
<?php
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
示例15: array
<?php
$this->breadcrumbs = array('Pe Kas Keluars' => array('index'), GxHtml::valueEx($model));
$this->menu = array(array('label' => Yii::t('app', 'List') . ' PeKasKeluar', 'url' => array('index')), array('label' => Yii::t('app', 'Create') . ' PeKasKeluar', 'url' => array('create')), array('label' => Yii::t('app', 'Update') . ' PeKasKeluar', 'url' => array('update', 'id' => $model->kas_keluar_id)), array('label' => Yii::t('app', 'Delete') . ' PeKasKeluar', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $model->kas_keluar_id), 'confirm' => 'Are you sure you want to delete this item?')));
?>
<h1><?php
echo Yii::t('app', 'View');
?>
PeKasKeluar #<?php
echo GxHtml::encode(GxHtml::valueEx($model));
?>
</h1>
<?php
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'attributes' => array('kas_keluar_id', 'doc_ref', 'no_bukti', 'amount', 'entry_time', 'trans_date', 'trans_via', array('label' => 'PeSuppliers', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->peSupplier)), array('peSuppliers/view', 'id' => GxActiveRecord::extractPkValue($model->peSupplier, true)))), array('label' => 'PeChartMaster', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->peAccountCode)), array('peChartMaster/view', 'id' => GxActiveRecord::extractPkValue($model->peAccountCode, true)))), array('label' => 'PeBankAccounts', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->peBankAccounts)), array('peBankAccounts/view', 'id' => GxActiveRecord::extractPkValue($model->peBankAccounts, true)))), array('label' => 'Users', 'type' => 'raw', 'value' => GxHtml::link(GxHtml::encode(GxHtml::valueEx($model->users)), array('users/view', 'id' => GxActiveRecord::extractPkValue($model->users, true))))), 'itemTemplate' => "<tr class=\"{class}\"><td style=\"width: 120px\"><b>{label}</b></td><td>{value}</td></tr>\n", 'htmlOptions' => array('class' => 'table')));
?>