Symfony2 PRE_SET_DATA $event->getData() return wrong object

前端 未结 1 392
悲哀的现实
悲哀的现实 2021-01-21 00:53

When I try to get the data from event PRE_SET_DATA, I get my object with good value, but I can\'t use it.

This is my test code :

        $builder->add         


        
相关标签:
1条回答
  • 2021-01-21 01:18

    I need to use this condition for the getter work :

            if ($data instanceof \YOU\CommercantBundle\Entity\LivraisonChoix) {
    
            }
    
    0 讨论(0)
提交回复
热议问题