Form/EventListener/BuildImageFormListener.php
public function postSubmit(FormEvent $event)
    {
        $image = $event->getData();

        if ($image && $image->hasFile()) {
            $image->setPath(null);
        }
    }
public function postSubmit(FormEvent $event)
    {
        $image = $event->getData();

        if ($image && $image->hasFile()) {
            $image->setPath(null);
        }
    }
public function postSubmit ( FormEvent $ event ) { $ image = $ event -> getData ( ) ; if ( $ image && $ image -> hasFile ( ) ) { $ image -> setPath ( null ) ; } }
Post form submit listener
@param  FormEvent $event
Post form submit listener