<?php
namespace App\Form;
use App\Entity\Support;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
class SupportType extends AbstractType
{
private $router;
public function __construct(UrlGeneratorInterface $router)
{
$this->router = $router;
}
public function getBlockPrefix()
{
return "okxtbu";
}
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('fwwpjm', null, [
"property_path" => "name",
"label" => "support_type.name.placeholder",
// "attr" => ["placeholder" => "support_type.name.placeholder"]
])
->add('fvsdbz', null, [
"property_path" => "society",
"label" => "support_type.society.placeholder",
// "attr" => ["placeholder" => "support_type.society.placeholder"]
])
->add('vlvtwf', null, [
"property_path" => "email",
"label" => "support_type.email.placeholder",
// "attr" => ["placeholder" => "support_type.email.placeholder"]
])
->add('kdhtbo', TextareaType::class, [
"property_path" => "message",
"label" => "support_type.message.placeholder",
"attr" => ["rows" => 3]
])
->add("iumapd", CheckboxType::class, [
"property_path" => "condition",
"mapped" => false,
"required" => true,
"label_attr" => [
"class" => "fw-400 checkbox-custom"
],
'label' => 'contact_type.condition_label',
'label_translation_parameters' => [
'%url%' => $this->router->generate('front_privacy_policy'),
],
"label_html" => true,
]);
}
public function configureOptions(OptionsResolver $resolver): void
{
$resolver->setDefaults([
'data_class' => Support::class,
]);
}
}