Created
April 21, 2024 16:29
-
-
Save tobimori/9d27c7c61bf33536189ca4e6e6b4b9b2 to your computer and use it in GitHub Desktop.
Revisions
-
tobimori created this gist
Apr 21, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,42 @@ <?php use tobimori\DreamForm\Fields\Field; class HeadingField extends Field { public static function blueprint(): array { return [ 'label' => 'Überschrift', 'preview' => 'heading', 'wysiwg' => true, 'fields' => [ 'text' => [ 'label' => t('field.blocks.heading.text'), 'type' => 'writer', 'inline' => true, 'placeholder' => t('field.blocks.heading.placeholder'), ], 'level' => [ 'type' => 'hidden', 'default' => 'h2' ] ] ]; } public static function hasValue(): bool { return false; } public static function group(): string { return 'cosmetic'; } public static function type(): string { return 'heading'; } }