block editor
This commit is contained in:
@@ -35,6 +35,11 @@ class SchemaService
|
||||
isEntry: $schemaArr["isEntry"] ?? false,
|
||||
color: $schemaArr["color"] ?? "",
|
||||
titleTemplate: $schemaArr["titleTemplate"] ?? "",
|
||||
),
|
||||
"block" => new BlockSchema(
|
||||
name: $schemaArr["name"],
|
||||
label: $schemaArr["label"],
|
||||
fields: (new Collection($schemaArr["fields"]))->map([$this, 'mapBlockFields'])
|
||||
)
|
||||
};
|
||||
|
||||
@@ -47,6 +52,13 @@ class SchemaService
|
||||
return new $className(...$field);
|
||||
}
|
||||
|
||||
public function mapBlockFields(array $field): FieldInterface
|
||||
{
|
||||
$className = "\\Lucent\Schema\BlockUi\\" . ucfirst($field["ui"]);
|
||||
unset($field["ui"]);
|
||||
return new $className(...$field);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// /**
|
||||
|
||||
Reference in New Issue
Block a user