2017-05-31 27 views

回答

0

Injet主義實體管理器服務定義:

arguments: ["@doctrine.orm.entity_manager"] 

在服務的構造函數:

public function __constructor(EntityManager $entityManager) 
    { 
     $this->em = $entityManager; 
    }