getEntityManager() 공개 메소드

public getEntityManager ( ) : EntityManager
리턴 EntityManager
예제 #1
0
파일: AdminGrid.php 프로젝트: venne/venne
 /**
  * @param integer $id
  * @param integer[] $action
  */
 public function tableDelete($id, $action)
 {
     if (is_array($action)) {
         foreach ($action as $item) {
             $this->tableDelete($item, null);
         }
     } else {
         try {
             $this->repository->getEntityManager()->remove($this->repository->find($id));
             $this->repository->getEntityManager()->flush();
         } catch (\Exception $e) {
             $this->onError($this, $e);
         }
     }
     $this->redirect('this');
     $this->redrawControl('table');
 }