本文整理汇总了PHP中Review::getRanks方法的典型用法代码示例。如果您正苦于以下问题:PHP Review::getRanks方法的具体用法?PHP Review::getRanks怎么用?PHP Review::getRanks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Review
的用法示例。
在下文中一共展示了Review::getRanks方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<div class="row">
<div class="col-lg-12">
<div class="portlet portlet-default">
<div class="portlet-heading">
<div class="portlet-title">
<h4>评价列表</h4>
</div>
<div class="clearfix"></div>
</div>
<div class="panel-collapse collapse in">
<div class="portlet-body">
<?php
$this->widget('GridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('header' => '操作', 'type' => 'raw', 'value' => '$data->operationButton'), array('name' => 'organizer_id', 'value' => '$data->organizer ? $data->organizer->name_zh : ""'), array('name' => 'rank', 'type' => 'raw', 'value' => '$data->getRankText()', 'filter' => Review::getRanks()), array('name' => 'competition_id', 'value' => '$data->competition ? $data->competition->name_zh : "无"'), array('header' => '比赛日期', 'value' => '$data->competition ? $data->competition->getDisplayDate() : "无"'), array('name' => 'date', 'type' => 'raw', 'value' => 'date("Y-m-d H:i:s", $data->date)', 'filter' => false), array('name' => 'comments', 'type' => 'raw', 'value' => '$data->getCommentsButton()'), array('name' => 'user_id', 'value' => '$data->user->name_zh'))));
?>
</div>
</div>
</div>
</div>
</div>
<div tabindex="-1" id="comments-modal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
</div>
<div class="modal-footer">
<button data-dismiss="modal" class="btn btn-default" type="button">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
示例2: array
<div class="portlet-body">
<?php
$form = $this->beginWidget('ActiveForm', array('htmlOptions' => array('class' => 'clearfix row'), 'enableClientValidation' => true));
?>
<?php
echo Html::formGroup($model, 'date', array('class' => 'col-lg-6'), $form->labelEx($model, 'date', array('label' => '时间')), Html::activeTextField($model, 'date', array('class' => 'datetime-picker', 'data-date-format' => 'yyyy-mm-dd hh:ii:ss')), $form->error($model, 'date', array('class' => 'text-danger')));
?>
<?php
echo Html::formGroup($model, 'competition_id', array('class' => 'col-lg-6'), $form->labelEx($model, 'competition_id', array('label' => '比赛')), $form->dropDownList($model, 'competition_id', Competition::getRegistrationCompetitions(), array('class' => 'form-control', 'prompt' => '')), $form->error($model, 'competition_id', array('class' => 'text-danger')));
?>
<div class="clearfix"></div>
<?php
echo Html::formGroup($model, 'organizer_id', array('class' => 'col-lg-6'), $form->labelEx($model, 'organizer_id', array('label' => '主办方')), $form->hiddenField($model, 'organizer_id'), CHtml::textField('', '', array('class' => 'form-control tokenfield', 'placeholder' => '输入名字或拼音')), $form->error($model, 'organizer_id', array('class' => 'text-danger')));
?>
<?php
echo Html::formGroup($model, 'rank', array('class' => 'col-lg-6'), $form->labelEx($model, 'rank', array('label' => '评级')), $form->dropDownList($model, 'rank', Review::getRanks(), array('class' => 'form-control', 'prompt' => '')), $form->error($model, 'rank', array('class' => 'text-danger')));
?>
<div class="clearfix"></div>
<?php
echo Html::formGroup($model, 'comments', array('class' => 'col-lg-12'), $form->labelEx($model, 'comments', array('label' => '备注')), $form->textArea($model, 'comments', array('class' => 'editor form-control', 'rows' => 6)), $form->error($model, 'comments', array('class' => 'text-danger')));
?>
<div class="col-lg-12">
<button type="submit" class="btn btn-default btn-square"><?php
echo Yii::t('common', 'Submit');
?>
</button>
</div>
<?php
$this->endWidget();
?>
</div>