-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPlugin.php
More file actions
40 lines (34 loc) · 1.25 KB
/
Plugin.php
File metadata and controls
40 lines (34 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace App\Vito\Plugins\Vitodeploy\TinyFileManagerPlugin;
use App\DTOs\DynamicField;
use App\DTOs\DynamicForm;
use App\Plugins\AbstractPlugin;
use App\Plugins\RegisterSiteType;
use App\Plugins\RegisterViews;
class Plugin extends AbstractPlugin
{
protected string $name = 'Tiny File Manager Plugin';
protected string $description = 'Tiny File Manager plugin for VitoDeploy [NOT recommended for PRODUCTION]';
public function boot(): void
{
RegisterViews::make('vitodeploy-tiny-file-manager')
->path(__DIR__.'/views')
->register();
RegisterSiteType::make(TinyFileManager::id())
->label('Tiny File Manager')
->handler(TinyFileManager::class)
->form(DynamicForm::make([
DynamicField::make('php_version')
->component()
->label('PHP Version'),
DynamicField::make('password')
->text()
->label('Admin Password'),
DynamicField::make('root_path')
->text()
->label('Wich path you want the file manager to have access to?')
->default('/home/vito'),
]))
->register();
}
}