block editor

This commit is contained in:
2023-10-14 18:06:36 +03:00
parent 9e37a7f730
commit 2e81d27ff6
21 changed files with 523 additions and 141 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
namespace Lucent\Schema\BlockUi;
use Lucent\Schema\FieldInfo;
use Lucent\Schema\FieldInterface;
use Lucent\Schema\FieldType;
use Lucent\Schema\Nullable;
use Lucent\Schema\Validator\RequiredInterface;
class Heading implements FieldInterface
{
public FieldInfo $info;
public function __construct(
public string $name,
public string $label,
public ?int $min = null,
public ?int $max = null,
public string $default = "",
)
{
$this->info = new FieldInfo("heading", "Heading", FieldType::STRING);
}
public function format(array $input, array $output): array
{
$output[$this->name] = $input[$this->name] ?? "";
return $output;
}
}