Closed williarin closed 3 years ago
Extend the classic editor with new tabs or sidebar components which can embed a form. This form will be transformed into custom fields.
Example that adds a tab and a sidebar card with two new embedded forms:
final class PhotoGalleryEditorExtension implements EditorExtensionInterface { public function build(EditorExtensionBuilderInterface $builder): void { $builder ->add('gallery_info', PhotoGalleryType::class, [ 'icon' => 'mdi-folder-multiple-image', 'label' => 'Gallery information' ]) ->add('author_info', GalleryAuthorType::class, [ 'label' => 'Author details' ], EditorExtensionBuilderInterface::COMPONENT_TYPE_SIDEBAR) ; } }
Then change the content type registration to link it:
$event->addContentType( new ContentType([ // ... 'editor_extension' => PhotoGalleryEditorExtension::class, ]) );
Extend the classic editor with new tabs or sidebar components which can embed a form.
This form will be transformed into custom fields.
Example that adds a tab and a sidebar card with two new embedded forms:
Then change the content type registration to link it: