Conditions | 5 |
Paths | 8 |
Total Lines | 22 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function getDataCellValue($model, $key, $index) |
||
22 | { |
||
23 | $html = []; |
||
24 | if ($this->displayDashboardLink || $model->monitoring) { |
||
25 | $html[] = Html::a($model->namePrefixed, ['tag/stats', 'id' => $model->id]); |
||
26 | } else { |
||
27 | $html[] = $model->{$this->attribute}; |
||
28 | } |
||
29 | $html[] = Html::a('<span class="fa fa-external-link text-sm"></span>', Url::tag($model->name), ['target' => '_blank']); |
||
30 | |||
31 | if (!$model->is_valid) { |
||
32 | $html[] = sprintf( |
||
33 | '<span class="fa fa-exclamation-triangle text-danger pull-right" data-toggle="tooltip" data-placement="top" title="%s, attempts: %s"></span>', |
||
34 | TagInvalidationType::getLabel($model->invalidation_type_id, 'Unknown reason'), |
||
35 | $model->invalidation_count |
||
36 | ); |
||
37 | } |
||
38 | if ($model->disabled) { |
||
39 | $html[] = '<span class="fa fa-exclamation-triangle text-danger pull-right" title="Not found."></span>'; |
||
40 | } |
||
41 | |||
42 | return implode(" \n", $html); |
||
43 | } |
||
44 | } |