## Summary - consolidate internal platform naming from `Tenant` to `Environment` / `ManagedEnvironment` across models, controllers, services, and Filament resources - rename environment-scoped UI surfaces such as dashboards, chooser flows, navigation, and related widgets to match the updated environment-first domain language - align middleware, onboarding/review lifecycle services, jobs, and route/context controllers with the new environment-scoped architecture ## Validation - not rerun as part of this commit/push/PR request ## Notes - branch is 1 commit ahead of `platform-dev` - main commit: `refactor: consolidate internal tenant model naming` Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #355
39 lines
821 B
PHP
39 lines
821 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support;
|
|
|
|
enum EnvironmentReviewStatus: string
|
|
{
|
|
case Draft = 'draft';
|
|
case Ready = 'ready';
|
|
case Published = 'published';
|
|
case Archived = 'archived';
|
|
case Superseded = 'superseded';
|
|
case Failed = 'failed';
|
|
|
|
/**
|
|
* @return list<string>
|
|
*/
|
|
public static function values(): array
|
|
{
|
|
return array_map(static fn (self $case): string => $case->value, self::cases());
|
|
}
|
|
|
|
public function isMutable(): bool
|
|
{
|
|
return in_array($this, [self::Draft, self::Ready, self::Failed], true);
|
|
}
|
|
|
|
public function isTerminal(): bool
|
|
{
|
|
return in_array($this, [self::Archived, self::Superseded], true);
|
|
}
|
|
|
|
public function isPublished(): bool
|
|
{
|
|
return $this === self::Published;
|
|
}
|
|
}
|