src/Form/SupportType.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use App\Entity\Support;
  4. use Symfony\Component\Form\AbstractType;
  5. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  6. use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  7. use Symfony\Component\Form\FormBuilderInterface;
  8. use Symfony\Component\OptionsResolver\OptionsResolver;
  9. use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
  10. class SupportType extends AbstractType
  11. {
  12.     private $router;
  13.     public function __construct(UrlGeneratorInterface $router)
  14.     {
  15.         $this->router $router;
  16.     }
  17.     public function getBlockPrefix()
  18.     {
  19.         return "okxtbu";
  20.     }
  21.     public function buildForm(FormBuilderInterface $builder, array $options): void
  22.     {
  23.         $builder
  24.             ->add('fwwpjm'null, [
  25.                 "property_path" => "name",
  26.                 "label" => "support_type.name.placeholder",
  27. //                "attr" => ["placeholder" => "support_type.name.placeholder"]
  28.             ])
  29.             ->add('fvsdbz'null, [
  30.                 "property_path" => "society",
  31.                 "label" => "support_type.society.placeholder",
  32. //                "attr" => ["placeholder" => "support_type.society.placeholder"]
  33.             ])
  34.             ->add('vlvtwf'null, [
  35.                 "property_path" => "email",
  36.                 "label" => "support_type.email.placeholder",
  37. //                "attr" => ["placeholder" => "support_type.email.placeholder"]
  38.             ])
  39.             ->add('kdhtbo'TextareaType::class, [
  40.                 "property_path" => "message",
  41.                 "label" => "support_type.message.placeholder",
  42.                 "attr" => ["rows" => 3]
  43.             ])
  44.             ->add("iumapd"CheckboxType::class, [
  45.                 "property_path" => "condition",
  46.                 "mapped" => false,
  47.                 "required" => true,
  48.                 "label_attr" => [
  49.                     "class" => "fw-400 checkbox-custom"
  50.                 ],
  51.                 'label' => 'contact_type.condition_label',
  52.                 'label_translation_parameters' => [
  53.                     '%url%' => $this->router->generate('front_privacy_policy'),
  54.                 ],
  55.                 "label_html" => true,
  56.             ]);
  57.     }
  58.     public function configureOptions(OptionsResolver $resolver): void
  59.     {
  60.         $resolver->setDefaults([
  61.             'data_class' => Support::class,
  62.         ]);
  63.     }
  64. }