Silex + Doctrine2 ORM + Dropdown (EntityType)

前端 未结 3 1826
南笙
南笙 2021-01-03 06:45

I have a controller that renders a form that is suppose to have a dropdown with titles mapped against a client_user entity. Below is code I use in my controller to create th

3条回答
  •  一整个雨季
    2021-01-03 07:38

    In your controller, try to call the service like that:

    $em = $this->get('doctrine.orm.entity_manager');

    Hope it will help you.

    Edit:

    Sorry, I thought you was on Symfony... I have too quickly read...

提交回复
热议问题