Deprecated: Return type of Google\Model::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 256

Deprecated: Return type of Google\Model::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 261

Deprecated: Return type of Google\Model::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 268

Deprecated: Return type of Google\Model::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Model.php on line 278

Deprecated: Return type of Google\Collection::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 22

Deprecated: Return type of Google\Collection::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 38

Deprecated: Return type of Google\Collection::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 30

Deprecated: Return type of Google\Collection::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 43

Deprecated: Return type of Google\Collection::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 14

Deprecated: Return type of Google\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/sanralsmme/vendor/google/apiclient/src/Collection.php on line 49
Symfony Profiler

src/Form/Type/TenderSubmissionFormType.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Form\Type;
  3. use App\Entity\TenderSubmissions;
  4. use EasyCorp\Bundle\EasyAdminBundle\Field\ChoiceField;
  5. use Symfony\Component\Form\AbstractType;
  6. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  7. use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  8. use Symfony\Component\Form\FormBuilderInterface;
  9. use Symfony\Component\OptionsResolver\OptionsResolver;
  10. use Symfony\Component\Form\Extension\Core\Type\TextType;
  11. use Symfony\Component\Form\Extension\Core\Type\TextareaType;
  12. use Symfony\Component\Form\Extension\Core\Type\HiddenType;
  13. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  14. use Symfony\Component\Form\FormEvent;
  15. use Symfony\Component\Form\FormEvents;
  16. use Doctrine\ORM\EntityManagerInterface;
  17. class TenderSubmissionFormType extends AbstractType
  18. {
  19.     protected $entityManager;
  20.     public static $tacError 'must be check';
  21.     public function __construct(EntityManagerInterface $entityManager)
  22.     {
  23.         $this->entityManager $entityManager;
  24.     }
  25.     public function buildForm(FormBuilderInterface $builder, array $options)
  26.     {
  27.         $builder
  28.             ->add('tenderId'HiddenType::class)
  29.             ->add('province'ChoiceType::class,
  30.             [
  31.                     'required' => true,
  32.                     'multiple' => false,
  33.                     'choices' => [
  34.                         'Eastern Cape' => 'Eastern Cape',
  35.                         'Free State' => 'Free State',
  36.                         'Gauteng' => 'Gauteng',
  37.                         'KwaZulu Natal' => 'KwaZulu Natal',
  38.                         'Limpopo' => 'Limpopo',
  39.                         'Mpumalanga' => 'Mpumalanga',
  40.                         'Northern Cape' => 'Northern Cape',
  41.                         'North West' => 'North West',
  42.                         'Western Cape' => 'Western Cape'
  43.                     ]
  44.                 ]
  45.             )
  46.             ->add('companyName'TextType::class,
  47.                 [
  48.                     'label' => 'Last Name',
  49.                     'required' => true,
  50.                 ]
  51.             )
  52.             ->add('contactName'TextType::class,
  53.                 [
  54.                     'label' => 'Contact Name',
  55.                     'required' => true
  56.                 ]
  57.             )
  58.             ->add('email'EmailType::class,
  59.                 [
  60.                     'label' => 'Email Address',
  61.                     'required' => true,
  62.                 ]
  63.             )
  64.             ->add('telephone',TextType::class,
  65.                 [
  66.                     'label' => 'Telephone',
  67.                     'required' => false
  68.                 ]
  69.             )
  70.             ->add(
  71.                 'created',
  72.                 HiddenType::class, [
  73.                     'data' => date('Y-m-d')
  74.                 ]
  75.             );
  76.         $builder
  77.             ->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) {
  78.                 $call_back $event->getData();
  79.                 $form $event->getForm();
  80.             });
  81.     }
  82.     public function configureOptions(OptionsResolver $resolver)
  83.     {
  84.         $resolver->setDefaults(
  85.             [
  86.                 'data_class' => TenderSubmissions::class
  87.             ]
  88.         );
  89.     }
  90. }