public function postSubmit(FormEvent $event)
    {
        $collection = $event->getData();
        
        if ($collection instanceof PersistentCollection){           
            foreach ($collection->getDeleteDiff() as $entity){   
                if ($entity instanceof MultiFileInterface){
                    $this->om->remove($entity);
                } 
            }
        }
    }
public function postSubmit(FormEvent $event)
    {
        $collection = $event->getData();
        
        if ($collection instanceof PersistentCollection){           
            foreach ($collection->getDeleteDiff() as $entity){   
                if ($entity instanceof MultiFileInterface){
                    $this->om->remove($entity);
                } 
            }
        }
    }
public function postSubmit ( FormEvent $ event ) { $ collection = $ event -> getData ( ) ; if ( $ collection instanceof PersistentCollection ) { foreach ( $ collection -> getDeleteDiff ( ) as $ entity ) { if ( $ entity instanceof MultiFileInterface ) { $ this -> om -> remove ( $ entity ) ; } } } }
Remove deleted files

@param FormEvent $event
Remove deleted files