Files

30 lines
608 B
PHP
Raw Permalink Normal View History

2026-10-15 20:59:32 -07:00
<?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;
}
}