<?php
namespace AdminBundle\Admin;
use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Show\ShowMapper;
class PostLogAdmin extends AbstractAdmin
{
protected function configureDatagridFilters(DatagridMapper $datagridMapper): void
{
$datagridMapper
->add('update_date')
;
}
protected function configureListFields(ListMapper $listMapper): void
{
$listMapper
->add('update_date')
->add('post.title')
->add('_action', null, [
'actions' => [
'show' => [],
],
])
;
}
protected function configureShowFields(ShowMapper $showMapper): void
{
$showMapper
->add('update_date')
->add('old_value')
->add('new_value')
;
}
}