diff --git a/src/DMS/Bundle/FilterBundle/Form/Type/FormTypeFilterExtension.php b/src/DMS/Bundle/FilterBundle/Form/Type/FormTypeFilterExtension.php index 9460a5f..d3811a8 100644 --- a/src/DMS/Bundle/FilterBundle/Form/Type/FormTypeFilterExtension.php +++ b/src/DMS/Bundle/FilterBundle/Form/Type/FormTypeFilterExtension.php @@ -6,6 +6,7 @@ use Symfony\Component\Form\FormBuilderInterface; use DMS\Bundle\FilterBundle\Service\Filter; use DMS\Bundle\FilterBundle\Form\EventListener\DelegatingFilterListener; +use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolverInterface; /** @@ -59,6 +60,16 @@ public function setDefaultOptions(OptionsResolverInterface $resolver) )); } + /** + * @param OptionsResolver $resolver + */ + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults(array( + 'cascade_filter' => true + )); + } + /** * {@inheritdoc} */ diff --git a/src/DMS/Bundle/FilterBundle/Resources/config/services.yml b/src/DMS/Bundle/FilterBundle/Resources/config/services.yml index 71be01d..f69bec9 100644 --- a/src/DMS/Bundle/FilterBundle/Resources/config/services.yml +++ b/src/DMS/Bundle/FilterBundle/Resources/config/services.yml @@ -16,7 +16,7 @@ services: filter: '@dms.filter' auto_filter: '%dms_filter.auto_filter_forms%' tags: - - { name: form.type_extension, alias: Symfony\Component\Form\Extension\Core\Type\FormType } + - { name: form.type_extension, alias: Symfony\Component\Form\Extension\Core\Type\FormType, extended_type: Symfony\Component\Form\Extension\Core\Type\FormType } dms.filter.container_loader: class: DMS\Bundle\FilterBundle\Loader\ContainerAwareLoader