Feat: Add shortcut methods to determine status of uploaded document
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user