Skip to content

Commit

Permalink
removed preValidate method & modified buildForm method
Browse files Browse the repository at this point in the history
  • Loading branch information
tambait committed Nov 24, 2020
1 parent 70666f2 commit 5a7383a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions src/Admin/AbstractAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@
use Sonata\Exporter\Source\SourceIteratorInterface;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\InputBag;
use Symfony\Component\HttpFoundation\ParameterBag;
Expand Down Expand Up @@ -649,13 +647,6 @@ public function delete(object $object): void
}
}

/**
* @phpstan-param T $object
*/
public function preValidate(object $object): void
{
}

public function preUpdate(object $object): void
{
}
Expand Down Expand Up @@ -2655,9 +2646,6 @@ protected function buildForm(): void
$this->loaded['form'] = true;

$formBuilder = $this->getFormBuilder();
$formBuilder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event): void {
$this->preValidate($event->getData());
}, 100);

$this->form = $formBuilder->getForm();
}
Expand Down
1 change: 0 additions & 1 deletion src/Admin/AdminInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
use Sonata\AdminBundle\Templating\MutableTemplateRegistryAwareInterface;
use Sonata\AdminBundle\Translator\LabelTranslatorStrategyInterface;
use Sonata\Exporter\Source\SourceIteratorInterface;
use Sonata\Form\Validator\ErrorElement;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down

0 comments on commit 5a7383a

Please sign in to comment.