Feat: Add shortcut methods to determine status of uploaded document

This commit is contained in:
Björn Fromme
2023-10-14 16:55:32 +02:00
parent 80990c9edc
commit 3576d72a0a
+10
View File
@@ -119,6 +119,16 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
return $this;
}
public function isConfirmed(): bool
{
return in_array($this->getStatus(), [static::STATUS_CHECKED, static::STATUS_PAID]);
}
public function isRejected(): bool
{
return static::STATUS_REJECTED === $this->getStatus();
}
public function getFilename(): ?string
{
return $this->filename;