php - How get id entity form -


hello guy went id y entity in field

this var_dump($form->getdata());

array (size=4)       'region' => string 'ddsdd' (length=5)       'name' => string 'zadzd' (length=5)       'lastname' => string 'zdazd' (length=5)       'type' =>          object(bundle\frontbundle\entity\foo)[591]           protected 'id' => int 2                        // how id            protected 'type' => string 'frein' (length=5) 

thanx you

in case doctrine entity can access calling getid() method.

$form->getdata()['type']->getid() 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -