Added timetravel URL for PartAttachment elements

This commit is contained in:
Jan Böhmer 2023-06-06 23:16:51 +02:00
parent efc152e3c8
commit ea8b179df1

View file

@ -26,6 +26,7 @@ use App\Entity\Attachments\Attachment;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Attachments\PartAttachment;
use App\Entity\Base\AbstractDBElement;
use App\Entity\Parameters\PartParameter;
use App\Entity\ProjectSystem\Project;
use App\Entity\LabelSystem\LabelProfile;
use App\Entity\Parts\Category;
@ -158,6 +159,12 @@ class EntityURLGenerator
'timestamp' => $dateTime->getTimestamp(),
]);
}
if ($entity instanceof PartParameter) {
return $this->urlGenerator->generate('part_info', [
'id' => $entity->getElement()->getID(),
'timestamp' => $dateTime->getTimestamp(),
]);
}
}
//Otherwise throw an error