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,7 +2,7 @@
|
||||
|
||||
namespace App\DTOs;
|
||||
|
||||
class DynamicFieldDTO
|
||||
class DynamicField
|
||||
{
|
||||
/**
|
||||
* @param array<int, mixed>|null $options
|
||||
@ -50,6 +50,13 @@ public function checkbox(): self
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function alert(): self
|
||||
{
|
||||
$this->type = 'alert';
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function name(string $name): self
|
||||
{
|
||||
$this->name = $name;
|
@ -2,15 +2,23 @@
|
||||
|
||||
namespace App\DTOs;
|
||||
|
||||
readonly class DynamicFieldsCollectionDTO
|
||||
readonly class DynamicForm
|
||||
{
|
||||
/**
|
||||
* @param array<int, DynamicFieldDTO> $fields
|
||||
* @param array<int, DynamicField> $fields
|
||||
*/
|
||||
public function __construct(
|
||||
private array $fields = [],
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @param array<int, DynamicField> $fields
|
||||
*/
|
||||
public static function make(array $fields): self
|
||||
{
|
||||
return new self($fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, mixed>
|
||||
*/
|
Reference in New Issue
Block a user