当前位置: 首页>>代码示例>>PHP>>正文


PHP Task::timeList方法代码示例

本文整理汇总了PHP中app\models\Task::timeList方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::timeList方法的具体用法?PHP Task::timeList怎么用?PHP Task::timeList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Task的用法示例。


在下文中一共展示了Task::timeList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

	    <?= $form->field($model, 'course_id')->textInput() ?>

	    <?= $form->field($model, 'task_type')->dropdownList(Task::typeList(), ['disabled' => 'true']) ?>

	    <?= $form->field($model, 'title')->widget(MarkdownEditor::classname(), ['height' => 260, 'encodeLabels' => true, 'smarty' => true, 'previewAction' => Url::to(['task/preview']),]); ?>

	    <?= $form->field($model, 'image')->textInput(['maxlength' => true]) ?>
		
		<?= $form->field($model, 'answer_json')->widget(MarkdownEditor::classname(), ['height' => 260, 'encodeLabels' => true, 'smarty' => true, 'previewAction' => Url::to(['task/preview']),]); ?>

	    <?= $form->field($model, 'score')->dropdownList(Task::scoreList()) ?>

	    <?= $form->field($model, 'is_timing')->dropdownList(Task::timingList()) ?>

		<span id="complete_time">
	    	<?= $form->field($model, 'complete_time')->dropdownList(Task::timeList()) ?>
		</span>
	    <div class="form-group">
	    	<label class="col-lg-2 control-label"></label>
	    	<div class="col-lg-4">
	        	<?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
	    	</div>
	    </div>

	    <?php ActiveForm::end(); ?>

	</div>

</div>

<script type="text/javascript" src="http://cdn.bootcss.com/jquery/2.2.0/jquery.js"></script>
开发者ID:songwanfu,项目名称:SummerNut,代码行数:31,代码来源:update-short-calculation.php

示例2: function

                },
                'headerOptions' => ['width' => '95px'],
            ],
            [
                'attribute' => 'is_timing',
                'format' => 'raw',
                'filter' => Html::activeDropDownList($searchModel, 'is_timing', Task::timingList(Task::INCLUDE_ALL), ['class' => 'form-control']),
                'value' => function ($model) {
                    $list = Task::timingList();
                    return $list[$model->is_timing];
                },
                'headerOptions' => ['width' => '95px'],
            ],
            [
                'attribute' => 'complete_time',
                'format' => 'raw',
                'filter' => Html::activeDropDownList($searchModel, 'complete_time', Task::timeList(Task::INCLUDE_ALL), ['class' => 'form-control']),
                'value' => function ($model) {
                    $list = Task::timeList();
                    return $list[$model->complete_time];
                },
                'headerOptions' => ['width' => '95px'],
            ],
            ['class' => 'yii\grid\ActionColumn'],
        ],
    ]); ?>
    
        

</div>
开发者ID:songwanfu,项目名称:SummerNut,代码行数:30,代码来源:index.php


注:本文中的app\models\Task::timeList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。