I have two entities 'status' and 'doctor'. Every doctor can add a status in his profile. When the doctor wants to add a status, he can add status for another doctor because of the choice field .
It's not logic, I want that every doctor add only his status, not for other doctor.
How can I fix it ?
This is the status form:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('medecin','entity',array('class'=>'DoctorBundle:medecin','property'=>'prenom','multiple'=>false))
->add('text')
->add('description')
->add('image',new ImageType())
;
}`