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