Skip to content

Instantly share code, notes, and snippets.

@rande
Created January 11, 2011 18:07
Show Gist options
  • Save rande/774820 to your computer and use it in GitHub Desktop.
Save rande/774820 to your computer and use it in GitHub Desktop.
if($description['edit'] == 'inline') {
$target_object = $description['reflection']->getValue($object);
if(!$target_object) {
$target_object = $description['configuration']->getNewInstance();
}
$target_fields = $description['configuration']->getFormFields();
$target_form = $description['configuration']->getForm($target_object, $target_fields);
$field = new \Symfony\Component\Form\FieldGroup($name);
foreach($target_form->getFields() as $name => $form_field) {
if($name == '_token') {
continue;
}
$field->add($form_field);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment