Kdyby\Doctrine\EntityRepository::getEntityManager PHP Method

getEntityManager() public method

public getEntityManager ( ) : EntityManager
return EntityManager
    public function getEntityManager()
    {
        return parent::getEntityManager();
    }

Usage Example

Beispiel #1
0
 /**
  * @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');
 }