TenantAtlas/app/Support/Tenants/TenantActionSurface.php

30 lines
761 B
PHP

<?php
declare(strict_types=1);
namespace App\Support\Tenants;
enum TenantActionSurface: string
{
case TenantIndexRow = 'tenant_index_row';
case TenantViewHeader = 'tenant_view_header';
case TenantEditHeader = 'tenant_edit_header';
case OnboardingIndexRow = 'onboarding_index_row';
case OnboardingDetailHeader = 'onboarding_detail_header';
case Widget = 'widget';
case ContextMenu = 'context_menu';
public function isOnboardingSurface(): bool
{
return match ($this) {
self::OnboardingIndexRow, self::OnboardingDetailHeader => true,
default => false,
};
}
public function isGenericTenantManagementSurface(): bool
{
return ! $this->isOnboardingSurface();
}
}