PHP Classes

File: views/actions/index.php

Recommend this page to a friend!
  Classes of Uldis Nelsons  >  D3 PHP Activity Log  >  views/actions/index.php  >  Download  
File: views/actions/index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: D3 PHP Activity Log
Track of changes in objects of given model objects
Author: By
Last change:
Date: 9 months ago
Size: 953 bytes
 

Contents

Class file image Download
<?php

use d3yii2\d3activity\components\ActivityRecord;
use
yii\grid\GridView;

/**
 * @var \yii\data\ActiveDataProvider $doclist
 */

?>

<div class="row file-row">
    <div class="col-sm-8">
        <?= GridView::widget([
           
'dataProvider' => $doclist,
           
'filterModel' => $doclist,
           
'layout' => '{items}',
           
'columns' => [
                [
                   
'header' => Yii::t('activities', 'Name'),
                   
'format' => 'raw',
                   
'attribute' => 'label',
                ],
                [
                   
'attribute' => 'dateTime',
                   
'value' => static function (ActivityRecord $model) {
                        return
$model->dateTime->format('Y-m-d H:i:s');
                    },
                   
'options' => [
                       
'style' => 'width:100px;'
                   
]
                ]
            ]
        ])
?>
</div>
</div>



For more information send a message to info at phpclasses dot org.