Skip to content

Instantly share code, notes, and snippets.

@rdohms
Created December 5, 2012 15:22
Show Gist options
  • Save rdohms/4216484 to your computer and use it in GitHub Desktop.
Save rdohms/4216484 to your computer and use it in GitHub Desktop.
Binding Events in Parent Form
<?php
abstract class MyAbstractType extends AbstractType
{
/** CODE */
}
<?php
class MyFormType extends MyAbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add();
...
}
}
@rdohms
Copy link
Author

rdohms commented Dec 5, 2012

Thanks, that is an idea.

Relying on the getParent still leaves me with the possibility of human error if the dev forgets to do that.
But since this is a service I may be able to do some smart juggling and force this to be called by the app itself.

Will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment