add objectId on watchdog
This commit is contained in:
@@ -679,14 +679,16 @@ class AdminController extends AbstractController
|
||||
}
|
||||
|
||||
#[Route('/watchdog', name: 'watchdog')]
|
||||
#[Route('/watchdog/view/{id}', name: 'watchdog_view')]
|
||||
#[Route('/watchdog/{type}', name: 'watchdog_type')]
|
||||
#[Route('/watchdog/{type}/{action}', name: 'watchdog_type_action')]
|
||||
#[Route('/watchdog/{type}/{action}', name: 'watchdog_type_action')]
|
||||
public function watchdog(
|
||||
PaginatorInterface $paginator,
|
||||
Request $Request,
|
||||
EntityManagerInterface $EntityManagerInterface,
|
||||
string $type = null,
|
||||
string $action = null
|
||||
string $action = null,
|
||||
int $id = null
|
||||
): Response {
|
||||
/**
|
||||
* @var LogEntryRepository $logEntryRepository
|
||||
@@ -704,6 +706,9 @@ class AdminController extends AbstractController
|
||||
->from('Gedmo\Loggable\Entity\LogEntry', 'l')
|
||||
->orderBy('l.loggedAt', 'DESC');
|
||||
|
||||
|
||||
|
||||
|
||||
if (null != $type) {
|
||||
$qb->where('l.objectClass = :type');
|
||||
$qb->setParameter('type', 'App\Entity\\' . $type);
|
||||
@@ -718,6 +723,11 @@ class AdminController extends AbstractController
|
||||
}
|
||||
}
|
||||
|
||||
if(null != $id){
|
||||
$qb->where('l.objectId = :id');
|
||||
$qb->setParameter('id', $id);
|
||||
}
|
||||
|
||||
$pagination = $paginator->paginate(
|
||||
$qb->getQuery()->getResult(),
|
||||
$Request->query->getInt('page', 1)
|
||||
|
||||
Reference in New Issue
Block a user