當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Review::getRanks方法代碼示例

本文整理匯總了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 -->
開發者ID:sunshy360,項目名稱:cubingchina,代碼行數:31,代碼來源:index.php

示例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>
開發者ID:sunshy360,項目名稱:cubingchina,代碼行數:31,代碼來源:edit.php


注:本文中的Review::getRanks方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。