protected function deleteAllEntitiesOfCollection($arrayCollection) { foreach ($arrayCollection as $entity) { $this->em->remove($entity); } }