public function deleteModel(ModelInterface $model) { $this->getEntityManager()->remove($model); $this->getEntityManager()->flush(); return $model; }