Content Elements
Creating a new content element
Form Type
final class TextContentElementType extends AbstractType
{
public const TYPE = 'text';
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add(self::TYPE, TextType::class, [
'label' => 'sylius_cms.ui.content_elements.type.' . self::TYPE,
])
;
}
}(Optional) Register the Form Type
Implement a renderer
Register a renderer
Create a Twig Template
Last updated
Was this helpful?
