2023-11-16 10:52:57 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Module;
|
|
|
|
|
2024-08-01 10:25:48 +02:00
|
|
|
use App\Setting\Contracts\Viewable;
|
2023-11-16 10:52:57 +01:00
|
|
|
use App\Setting\Contracts\Storeable;
|
|
|
|
use App\Setting\LocalSettings;
|
|
|
|
|
2024-08-01 10:25:48 +02:00
|
|
|
class ModuleSettings extends LocalSettings implements Viewable, Storeable
|
2023-11-16 10:52:57 +01:00
|
|
|
{
|
|
|
|
/** @var array<int, string> */
|
|
|
|
public array $modules;
|
|
|
|
|
|
|
|
public static function group(): string
|
|
|
|
{
|
|
|
|
return 'module';
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function slug(): string
|
|
|
|
{
|
|
|
|
return 'module';
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function title(): string
|
|
|
|
{
|
|
|
|
return 'Module';
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function indexAction(): string
|
|
|
|
{
|
|
|
|
return ModuleIndexAction::class;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function storeAction(): string
|
|
|
|
{
|
|
|
|
return ModuleStoreAction::class;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function hasModule(string $module): bool
|
|
|
|
{
|
|
|
|
return in_array($module, $this->modules);
|
|
|
|
}
|
|
|
|
}
|