mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
- 2.x - sites (wip)
- improved ssh error handling - database soft deletes
This commit is contained in:
24
app/Web/Fields/CodeEditorField.php
Normal file
24
app/Web/Fields/CodeEditorField.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Web\Fields;
|
||||
|
||||
use Filament\Forms\Components\Field;
|
||||
|
||||
class CodeEditorField extends Field
|
||||
{
|
||||
protected string $view = 'web.fields.code-editor';
|
||||
|
||||
public string $lang = '';
|
||||
|
||||
public bool $readonly = false;
|
||||
|
||||
public function getOptions(): array
|
||||
{
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
'name' => $this->getName(),
|
||||
'lang' => $this->lang,
|
||||
'value' => json_encode($this->getState() ?? ''),
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user