for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file was created by developers working at BitBag
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
*/
declare(strict_types=1);
namespace BitBag\SyliusCmsPlugin\Form\Type;
use BitBag\SyliusCmsPlugin\Form\Type\Translation\SectionTranslationType;
use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
use Sylius\Bundle\ResourceBundle\Form\Type\ResourceTranslationsType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
final class SectionType extends AbstractResourceType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
$builder
->add('code', TextType::class, [
'label' => 'bitbag_sylius_cms_plugin.ui.code',
'disabled' => null !== $builder->getData()->getCode(),
])
->add('translations', ResourceTranslationsType::class, [
'entry_type' => SectionTranslationType::class,
;
}
public function getBlockPrefix(): string
return 'bitbag_sylius_cms_plugin_section';