Files
mytodos/app/FolderVisibility.php
ecdown 177f122c10
tests / ci (push) Canceled after 0s
added roles and organizations
2026-10-15 20:59:32 -07:00

30 lines
608 B
PHP

<?php
namespace App;
enum FolderVisibility: string
{
case Private = 'private';
case Workspace = 'workspace';
/**
* Get the human-friendly label for the visibility.
*/
public function label(): string
{
return match ($this) {
self::Private => 'Private',
self::Workspace => 'Shared with workspace',
};
}
/**
* Determine whether a folder at this visibility is opened up to every
* member of its workspace.
*/
public function isSharedWithWorkspace(): bool
{
return $this === self::Workspace;
}
}