Files
ABSDEV/Modules/Builder/Components/HeroComponent.php
T
Mark Gregory 412e8134a1 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
2026-07-24 13:29:58 +01:00

13 lines
843 B
PHP

<?php
namespace Modules\Builder\Components;
use Modules\Builder\Contracts\BuilderComponent;
final class HeroComponent implements BuilderComponent
{
public function type(): string { return 'hero'; }
public function label(): string { return 'Hero'; }
public function category(): string { return 'Content'; }
public function schema(): array { return ['heading'=>['type'=>'text','required'=>true],'content'=>['type'=>'textarea'],'button_label'=>['type'=>'text'],'button_url'=>['type'=>'text']]; }
public function defaults(): array { return ['heading'=>'A compelling headline','content'=>'Add supporting content here.','button_label'=>'Learn more','button_url'=>'#']; }
public function render(array $properties, array $context=[]): string { return view('builder::components.hero',['properties'=>$properties])->render(); }
}