Allow to show collection elements that were deleted before by timetravel

This commit is contained in:
Jan Böhmer 2020-02-29 22:53:53 +01:00
parent b5bc096972
commit f604022e49
9 changed files with 386 additions and 78 deletions

View file

@ -49,6 +49,7 @@ use App\DataTables\Column\LogEntryTargetColumn;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Contracts\TimeTravelInterface;
use App\Entity\LogSystem\AbstractLogEntry;
use App\Entity\LogSystem\CollectionElementDeleted;
use App\Exceptions\EntityNotSupportedException;
use App\Services\ElementTypeNameGenerator;
use App\Services\EntityURLGenerator;
@ -211,8 +212,9 @@ class LogDataTable implements DataTableTypeInterface
'icon' => 'fas fa-fw fa-eye',
'href' => function ($value, AbstractLogEntry $context) {
if (
$context instanceof TimeTravelInterface
&& $context->hasOldDataInformations()
($context instanceof TimeTravelInterface
&& $context->hasOldDataInformations())
|| $context instanceof CollectionElementDeleted
) {
try {
$target = $this->logRepo->getTargetElement($context);