| Conditions | 3 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function renderData() |
||
| 39 | { |
||
| 40 | if (empty($this->statuses)) { |
||
| 41 | return Yii::t('hipanel', 'No events were recorded'); |
||
| 42 | } |
||
| 43 | |||
| 44 | $res = Html::beginTag('table', ['class' => 'table table-condensed']); |
||
| 45 | $res .= Html::beginTag('tr'); |
||
| 46 | $res .= Html::tag('th', Yii::t('hipanel', 'Event')); |
||
| 47 | $res .= Html::tag('th', Yii::t('hipanel', 'Time')); |
||
| 48 | $res .= Html::endTag('tr'); |
||
| 49 | foreach ($this->statuses as $status => $time) { |
||
| 50 | $res .= Html::beginTag('tr'); |
||
| 51 | $res .= Html::tag('td', Yii::t('hipanel:synt', $status)); |
||
| 52 | $res .= Html::tag('td', Yii::$app->formatter->asDatetime($time)); |
||
| 53 | $res .= Html::endTag('tr'); |
||
| 54 | } |
||
| 55 | $res .= Html::endTag('table'); |
||
| 56 | return $res; |
||
| 57 | } |
||
| 58 | } |
||
| 59 |