mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 09:35:49 +02:00
Added timetravel URL for PartAttachment elements
This commit is contained in:
parent
efc152e3c8
commit
ea8b179df1
1 changed files with 7 additions and 0 deletions
|
@ -26,6 +26,7 @@ use App\Entity\Attachments\Attachment;
|
||||||
use App\Entity\Attachments\AttachmentType;
|
use App\Entity\Attachments\AttachmentType;
|
||||||
use App\Entity\Attachments\PartAttachment;
|
use App\Entity\Attachments\PartAttachment;
|
||||||
use App\Entity\Base\AbstractDBElement;
|
use App\Entity\Base\AbstractDBElement;
|
||||||
|
use App\Entity\Parameters\PartParameter;
|
||||||
use App\Entity\ProjectSystem\Project;
|
use App\Entity\ProjectSystem\Project;
|
||||||
use App\Entity\LabelSystem\LabelProfile;
|
use App\Entity\LabelSystem\LabelProfile;
|
||||||
use App\Entity\Parts\Category;
|
use App\Entity\Parts\Category;
|
||||||
|
@ -158,6 +159,12 @@ class EntityURLGenerator
|
||||||
'timestamp' => $dateTime->getTimestamp(),
|
'timestamp' => $dateTime->getTimestamp(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
if ($entity instanceof PartParameter) {
|
||||||
|
return $this->urlGenerator->generate('part_info', [
|
||||||
|
'id' => $entity->getElement()->getID(),
|
||||||
|
'timestamp' => $dateTime->getTimestamp(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Otherwise throw an error
|
//Otherwise throw an error
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue