/** * Form event - adds entities to uow to be delete * * @param DataEvent $event */ public function postBind(DataEvent $event) { $collection = $event->getData(); if ($collection instanceof PersistentCollection) { foreach ($collection->getDeleteDiff() as $entity) { $this->om->remove($entity); } } }