本文整理汇总了PHP中Products::gridAvailableItems方法的典型用法代码示例。如果您正苦于以下问题:PHP Products::gridAvailableItems方法的具体用法?PHP Products::gridAvailableItems怎么用?PHP Products::gridAvailableItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products
的用法示例。
在下文中一共展示了Products::gridAvailableItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array_key_exists
</div>
<?php
}
?>
</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('available', array_key_exists('available', $filter) ? $filter['available'] : (string) FALSE, Products::gridAvailableItems(TRUE), ['class' => 'input-inline input-large form-control']);
?>
</div>
</div>
<div class="col-md-6">
<h4 class="form-section"><?php
echo Yii::t('app', 'Дата создания продукта');
?>
</h4>
<div class="row" style="margin: 0 15px 0;">
<div class="form-group">
<label class="сontrol-label col-md-3"><?php
echo Yii::t('app', 'ОТ');
?>
:</label>
<div class="col-md-9">
示例2: array
<?php
echo $form->dropDownList($model, 'status', Products::gridStatusItems(), array('class' => 'form-control'));
?>
<span class="help-block text-danger"><?php
echo $form->error($model, 'status');
?>
</span>
</div>
</div>
<div class="form-group" style="margin-top: 20px;">
<?php
echo $form->labelEx($model, 'available', array('class' => 'col-md-2 control-label'));
?>
<div class="col-md-10">
<?php
echo $form->dropDownList($model, 'available', Products::gridAvailableItems(), array('class' => 'form-control'));
?>
<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">
示例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))'))));