My problem was solved, when I defined FormType
for needed collection:
class MyType extends AbstractType
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder->add('first_node', 'text');
$builder->add('second_node', 'text');
}
public function getDefaultOptions(array $options)
{
return array();
}
public function getName()
{
return 'mytype';
}
}
Then I used it in builder:
$builder = $this->myHelper
->createBuilder('form', null)
->add('my_group', new MyType(), array(
'label' => 'mylabel'
));
return $builder->getForm();
After this data was bound to form correctly.