private function save(FormInterface $form, FormConfigurationInterface $configuration)
    {
        $this->eventDispatcher->dispatch(
            self::EVENT_FORM_SAVE,
            new FormEvent(
                $form,
                $configuration
            )
        );

        if (!$configuration->getSave()) {
            return;
        }

        $this->entityManager->persist($form->getData());
        $this->entityManager->flush();

        $this->eventDispatcher->dispatch(
            self::EVENT_FORM_SAVED,
            new FormEvent(
                $form,
                $configuration
            )
        );
    }
private function save(FormInterface $form, FormConfigurationInterface $configuration)
    {
        $this->eventDispatcher->dispatch(
            self::EVENT_FORM_SAVE,
            new FormEvent(
                $form,
                $configuration
            )
        );

        if (!$configuration->getSave()) {
            return;
        }

        $this->entityManager->persist($form->getData());
        $this->entityManager->flush();

        $this->eventDispatcher->dispatch(
            self::EVENT_FORM_SAVED,
            new FormEvent(
                $form,
                $configuration
            )
        );
    }
private function save ( FormInterface $ form , FormConfigurationInterface $ configuration ) { $ this -> eventDispatcher -> dispatch ( self :: EVENT_FORM_SAVE , new FormEvent ( $ form , $ configuration ) ) ; if ( ! $ configuration -> getSave ( ) ) { return ; } $ this -> entityManager -> persist ( $ form -> getData ( ) ) ; $ this -> entityManager -> flush ( ) ; $ this -> eventDispatcher -> dispatch ( self :: EVENT_FORM_SAVED , new FormEvent ( $ form , $ configuration ) ) ; }
Save form.

@param FormInterface $form
@param FormConfigurationInterface $configuration
Save form .