vendor/sylius/sylius/src/Sylius/Bundle/TaxonomyBundle/Form/Type/TaxonTranslationType.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\TaxonomyBundle\Form\Type;
  12. use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType;
  13. use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  14. use Symfony\Component\Form\Extension\Core\Type\TextType;
  15. use Symfony\Component\Form\FormBuilderInterface;
  16. final class TaxonTranslationType extends AbstractResourceType
  17. {
  18.     public function buildForm(FormBuilderInterface $builder, array $options): void
  19.     {
  20.         $builder
  21.             ->add('name'TextType::class, [
  22.                 'label' => 'sylius.form.taxon.name',
  23.             ])
  24.             ->add('slug'TextType::class, [
  25.                 'label' => 'sylius.form.taxon.slug',
  26.             ])
  27.             ->add('description'TextareaType::class, [
  28.                 'required' => false,
  29.                 'label' => 'sylius.form.taxon.description',
  30.             ])
  31.         ;
  32.     }
  33.     public function getBlockPrefix(): string
  34.     {
  35.         return 'sylius_taxon_translation';
  36.     }
  37. }