refactor: mail collections delete
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -20,6 +20,7 @@ use JsonSerializable;
|
||||
*/
|
||||
enum CollectionRoles: string implements JsonSerializable {
|
||||
|
||||
case None = '';
|
||||
case Inbox = 'inbox';
|
||||
case Drafts = 'drafts';
|
||||
case Sent = 'sent';
|
||||
@@ -28,7 +29,6 @@ enum CollectionRoles: string implements JsonSerializable {
|
||||
case Archive = 'archive';
|
||||
case Outbox = 'outbox';
|
||||
case Queue = 'queue';
|
||||
case Custom = 'custom';
|
||||
|
||||
public function jsonSerialize(): string {
|
||||
return $this->value;
|
||||
|
||||
@@ -38,6 +38,7 @@ interface ServiceBaseInterface extends ResourceServiceBaseInterface {
|
||||
// Collection Filter
|
||||
public const CAPABILITY_COLLECTION_FILTER_LABEL = 'label';
|
||||
public const CAPABILITY_COLLECTION_FILTER_ROLE = 'role';
|
||||
public const CAPABILITY_COLLECTION_FILTER_SUBSCRIBED = 'subscribed';
|
||||
// Collection Sort
|
||||
public const CAPABILITY_COLLECTION_SORT_LABEL = 'label';
|
||||
public const CAPABILITY_COLLECTION_SORT_RANK = 'rank';
|
||||
|
||||
@@ -68,11 +68,10 @@ interface ServiceCollectionMutableInterface extends ServiceBaseInterface {
|
||||
*
|
||||
* @param string|int $identifier Collection ID
|
||||
* @param bool $force Force deletion even if not empty
|
||||
* @param bool $recursive Recursively delete contents
|
||||
*
|
||||
* @return bool True if deleted
|
||||
* @return CollectionBaseInterface|true Collection object on soft delete, true on hard delete
|
||||
*/
|
||||
public function collectionDelete(string|int $identifier, bool $force = false, bool $recursive = false): bool;
|
||||
public function collectionDelete(string|int $identifier, bool $force = false): CollectionBaseInterface | true;
|
||||
|
||||
/**
|
||||
* Moves a collection to a new parent
|
||||
|
||||
Reference in New Issue
Block a user