Builder administration area
* Page builder foundation * Form builder document type * Dashboard builder document type * Report builder document type * Menu builder document type * Email builder document type * Query builder document type * Workflow builder document type * Reusable component registry * Form-field registry * Dashboard-widget registry * Hero, heading, and rich-content components * JSON document schema * Saved builder documents * Draft, published, and archived states * Document version history * Reusable builder templates * Component rendering service * Extensible BuilderComponent contract * Authenticated Builder REST endpoints * Administration navigation * Builder permissions * Module registration and test
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
namespace Modules\Builder\Components;
|
||||
use Modules\Builder\Contracts\BuilderComponent;
|
||||
final class ContentComponent implements BuilderComponent
|
||||
{
|
||||
public function type(): string { return 'content'; }
|
||||
public function label(): string { return 'Rich Content'; }
|
||||
public function category(): string { return 'Content'; }
|
||||
public function schema(): array { return ['content'=>['type'=>'textarea','required'=>true]]; }
|
||||
public function defaults(): array { return ['content'=>'<p>Add your content here.</p>']; }
|
||||
public function render(array $properties, array $context=[]): string { return (string)($properties['content']??''); }
|
||||
}
|
||||
Reference in New Issue
Block a user