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
Post a Comment