Answer the question
In order to leave comments, you need to log in
Loading an object in a Zend Form Select using Doctrine - Zend Expressive 1.0?
How can I load data from the database into the form (drop-down list element) using doctrine (Doctrine ORM), using the Zend Expressive and ZendForm framework. It used to be possible with DoctrineModule or DoctrineORMModule for Zend Framework 2, but it is no longer compatible with Zend Expressive.
Deprecated method:
$this->add(array(
'name' => 'continent',
'type' => 'DoctrineModule\Form\Element\ObjectSelect',
'options' => array(
'object_manager' => $this->entityManager,
'target_class' => 'Tutorial\Entity\Countries',
'property' => 'continent',
'is_method' => true,
'find_method' => array(
'name' => 'getContinent',
),
),
));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question