<?php
namespace App\Form\Type;
use App\Entity\Company;
use App\Entity\PotentialCustomerCompanyContact;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class PotentialCustomerCompanyContactType extends AbstractType
{
/**
* @var Company
*/
protected $company;
/**
* {@inheritDoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(
[
'data_class' => PotentialCustomerCompanyContact::class,
'translation_domain' => 'PotentialCustomerCompanyContact',
'empty_data' => new PotentialCustomerCompanyContact(),
]
);
}
/**
* {@inheritDoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'name',
TextType::class,
[
'label' => false,
'attr' => [
'placeholder' => 'property.name',
],
]
)
->add(
'role',
TextType::class,
[
'label' => false,
'attr' => [
'placeholder' => 'property.role',
],
]
)
->add(
'email',
EmailType::class,
[
'label' => false,
'required' => false,
'attr' => [
'placeholder' => 'property.email',
],
]
)
->add(
'phone',
TextType::class,
[
'label' => false,
'required' => false,
'attr' => [
'placeholder' => 'property.phone',
],
]
)
;
}
}