Improved history handling of parameters.

This commit is contained in:
Jan Böhmer 2020-03-28 17:19:02 +01:00
parent f8af23b92b
commit 70c1fb7cc4
2 changed files with 7 additions and 0 deletions

View file

@ -30,6 +30,7 @@ use App\Entity\LogSystem\CollectionElementDeleted;
use App\Entity\LogSystem\ElementCreatedLogEntry;
use App\Entity\LogSystem\ElementDeletedLogEntry;
use App\Entity\LogSystem\ElementEditedLogEntry;
use App\Entity\Parameters\AbstractParameter;
use App\Entity\Parts\PartLot;
use App\Entity\PriceInformations\Orderdetail;
use App\Entity\PriceInformations\Pricedetail;
@ -59,6 +60,7 @@ class EventLoggerSubscriber implements EventSubscriber
Orderdetail::class => ['part'],
Pricedetail::class => ['orderdetail'],
Attachment::class => ['element'],
AbstractParameter::class => ['element']
];
protected const MAX_STRING_LENGTH = 2000;

View file

@ -25,6 +25,7 @@ namespace App\Services\LogSystem;
use App\Entity\Attachments\AttachmentContainingDBElement;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Parts\Part;
class HistoryHelper
@ -57,6 +58,10 @@ class HistoryHelper
}
}
if ($element instanceof Part || $element instanceof AbstractStructuralDBElement) {
$array = array_merge($array, $element->getParameters()->toArray());
}
return $array;
}
}