本文整理匯總了PHP中Products::gridStatusItems方法的典型用法代碼示例。如果您正苦於以下問題:PHP Products::gridStatusItems方法的具體用法?PHP Products::gridStatusItems怎麽用?PHP Products::gridStatusItems使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Products
的用法示例。
在下文中一共展示了Products::gridStatusItems方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array_key_exists
<?php
echo CHtml::dropDownList('currency__id', array_key_exists('currency__id', $filter) ? $filter['currency__id'] : (string) FALSE, Products::gridCurrencyItems(TRUE), ['class' => 'input-inline input-large form-control']);
?>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h4 class="form-section"> <?php
echo Yii::t('app', 'Статус');
?>
</h4>
<div class="form-group" style="margin-left: 0; margin-right: 0;">
<?php
echo CHtml::dropDownList('status', array_key_exists('status', $filter) ? $filter['status'] : (string) FALSE, Products::gridStatusItems(TRUE), ['class' => 'input-inline input-large form-control']);
?>
</div>
</div>
<?php
if (!empty($specialStatuses)) {
?>
<div class="col-md-6">
<h4 class="form-section"> <?php
echo Yii::t('app', 'Особый статус');
?>
</h4>
<div class="form-group" style="margin-left: 0; margin-right: 0;">
<?php
echo CHtml::dropDownList('product_special_statuses__id', array_key_exists('product_special_statuses__id', $filter) ? $filter['product_special_statuses__id'] : (string) FALSE, ProductSpecialStatuses::getListForSelector(), ['class' => 'input-inline input-large form-control']);
?>
示例2: array
<span class="help-block text-danger"><?php
echo $form->error($model, 'available');
?>
</span>
</div>
</div>
<?php
if ($model->is_allowed_show_at_home) {
?>
<div class="form-group" style="margin-top: 20px;">
<?php
echo $form->labelEx($model, 'show_at_home', array('class' => 'col-md-2 control-label'));
?>
<div class="col-md-10">
<?php
echo $form->checkBox($model, 'show_at_home', Products::gridStatusItems(), array('class' => 'form-control'));
?>
<span class="help-block text-danger"><?php
echo $form->error($model, 'show_at_home');
?>
</span>
</div>
</div>
<?php
}
?>
<div class="form-group" style="margin-top: 20px;">
<?php
echo $form->labelEx($model, 'currency__id', array('class' => 'col-md-2 control-label'));
?>
<div class="col-md-10">
示例3: array
<?php
$this->widget('zii.widgets.grid.CGridView', array('id' => 'products-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'ajaxUpdate' => true, 'ajaxUrl' => Yii::app()->createUrl('/admin/catalog/products/index'), 'pager' => array('class' => 'CLinkPager', 'header' => '', 'maxButtonCount' => 10, 'htmlOptions' => array('class' => 'pagination')), 'htmlOptions' => array('class' => 'table table-hover'), 'columns' => array(array('name' => 'id', 'value' => '$data->id'), 'article', array('name' => 'productName', 'value' => '$data->lang->name'), array('name' => 'currency__id', 'value' => 'Products::gridCurrencyItem($data->currency__id)', 'filter' => Products::gridCurrencyItems()), 'price', 'points', array('name' => 'status', 'value' => 'Products::gridStatusItem($data->status)', 'filter' => Products::gridStatusItems()), array('name' => 'available', 'value' => 'Products::gridAvailableItem($data->available)', 'filter' => Products::gridAvailableItems()), array('header' => 'Операции', 'class' => 'CButtonColumn', 'template' => '{view} {update} {delete}', 'deleteButtonUrl' => 'Yii::app()->controller->createUrl("ajaxproducts/delete", array("id" => $data->primaryKey))'))));