mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 01:12:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -2,43 +2,20 @@
|
||||
|
||||
namespace App\SiteTypes;
|
||||
|
||||
use App\DTOs\DynamicFieldDTO;
|
||||
use App\DTOs\DynamicFieldsCollectionDTO;
|
||||
use App\Enums\SiteFeature;
|
||||
use App\Exceptions\SSHError;
|
||||
use App\Models\Site;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class PHPBlank extends PHPSite
|
||||
{
|
||||
public static function id(): string
|
||||
{
|
||||
return 'php-blank';
|
||||
}
|
||||
|
||||
public static function make(): self
|
||||
{
|
||||
return new self(new Site(['type' => \App\Enums\SiteType::PHP]));
|
||||
}
|
||||
|
||||
public function supportedFeatures(): array
|
||||
{
|
||||
return [
|
||||
SiteFeature::DEPLOYMENT,
|
||||
SiteFeature::COMMANDS,
|
||||
SiteFeature::ENV,
|
||||
SiteFeature::SSL,
|
||||
SiteFeature::WORKERS,
|
||||
];
|
||||
}
|
||||
|
||||
public function fields(): DynamicFieldsCollectionDTO
|
||||
{
|
||||
return new DynamicFieldsCollectionDTO([
|
||||
DynamicFieldDTO::make('php_version')
|
||||
->component()
|
||||
->label('PHP Version'),
|
||||
DynamicFieldDTO::make('web_directory')
|
||||
->text()
|
||||
->label('Web Directory')
|
||||
->placeholder('For / leave empty')
|
||||
->description('The relative path of your website from /home/vito/your-domain/'),
|
||||
]);
|
||||
return new self(new Site(['type' => self::id()]));
|
||||
}
|
||||
|
||||
public function createRules(array $input): array
|
||||
|
Reference in New Issue
Block a user