| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | public function getDataCellValue($model, $key, $index) |
||
| 23 | { |
||
| 24 | return ArraySpoiler::widget([ |
||
| 25 | 'mode' => ArraySpoiler::MODE_SPOILER, |
||
| 26 | 'data' => parent::getDataCellValue($model, $key, $index), |
||
| 27 | 'delimiter' => ' ', |
||
| 28 | 'formatter' => function ($doc) { |
||
| 29 | return Html::a( |
||
| 30 | FontIcon::i('fa-file-pdf-o fa-2x') . date(' M Y', strtotime($doc->validity_start)), |
||
| 31 | ["/file/{$doc->file_id}/{$doc->filename}", 'nocache' => 1], |
||
| 32 | ['target' => '_blank', 'class' => 'text-info text-nowrap col-xs-6 col-sm-6 col-md-6 col-lg-3'] |
||
| 33 | ); |
||
| 34 | }, |
||
| 35 | 'template' => '{button}{visible}{hidden}', |
||
| 36 | 'visibleCount' => 2, |
||
| 37 | 'button' => [ |
||
| 38 | 'label' => FontIcon::i('fa-history fa-2x') . ' ' . Yii::t('hipanel', 'History'), |
||
| 39 | 'class' => 'pull-right text-nowrap', |
||
| 40 | ], |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |