本文整理汇总了PHP中app\components\Helper::formatTimeDuration方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::formatTimeDuration方法的具体用法?PHP Helper::formatTimeDuration怎么用?PHP Helper::formatTimeDuration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\components\Helper
的用法示例。
在下文中一共展示了Helper::formatTimeDuration方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
?>
<?php
echo $form->field($searchModel, 'dateFrom')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd']);
?>
<?php
echo $form->field($searchModel, 'dateTo')->widget(DatePicker::className(), ['dateFormat' => 'yyyy-MM-dd']);
?>
<?php
echo \yii\bootstrap\Button::widget(['label' => 'Submit', 'options' => ['class' => 'btn-primary']]);
ActiveForm::end();
?>
<div id="keys-activity-area" class="keys-activity-area clearfix"></div>
<div id="keys-activity" class="keys-activity clearfix"></div>
<div id="color-strip" class="color-strip clearfix"></div>
<div id="color-strip-clusters" class="color-strip clearfix"></div>
<div id="tasks" class="tasks-list"></div>
<div id="sunburst" class="clearfix"></div>
<div id="sunburst-clusters" class="clearfix"></div>
<div id="sunburst-task" class="clearfix"></div>
<div style="margin: 1em;" class="clearfix"><strong>Total activity:</strong> <?php
echo Helper::formatTimeDuration($totalActivity / 1000);
?>
</div>
<?php
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['id', 'process.screenName', ['attribute' => 'title', 'visible' => $searchModel->groupBy == 'title', 'value' => function ($model, $key, $index, $column) {
return \yii\helpers\Html::a($model->title, ['window/view', 'id' => $model->id]);
}, 'format' => 'html'], 'formattedDuration', 'motions', 'motions_filtered', 'clicks', 'scrolls', 'keys']]);
示例2: getFormattedDuration
public function getFormattedDuration()
{
return Helper::formatTimeDuration($this->time / 1000);
}