0
... $form = $this->createFormBuilder($foo)
->add('deviceId', EntityType::class, array(
'class' => 'FooBundle:Foo',
'choice_label' => 'deviceId'
))
...
ユーザがdeviceIdのどのオプションを選択したかを知るにはどうすればよいでしょうか。symfonyエンティティタイプ - 選択した値を取得する方法
...
if ($form->isSubmitted() && $form->isValid()) {
/*Getting the value that was selected
and doing something with it
for exampe removing it from the database*/
}
...
$ form ['deviceId'] - > getData(); 'は、私が探していたものです。ヘルプ@DOZに感謝します。 –