コントローラーでこのコードを試しました
$form = $this->createForm(new CentrexEdit2Type($ids), $centrex);
ids
フォームビルダーにフォームを追加したい:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$ids = $options['ids'];
.......
私はそれに失敗しました
ここで私はコードに参加しています:
if ($step==2){
$form = $this->createForm(new CentrexEdit1Type(), $centrex);
$ids=$form->get('bases')->getData();
}
foreach($ids as $id){echo($id->getId());}
if ($step==3){
$form = $this->createForm(new CentrexEdit2Type(array('ids'=>$ids)), $centrex);
}
必要な$ids
とき$step==3
、これが問題です。