PHP Class DMS\Bundle\FilterBundle\Form\EventListener\DelegatingFilterListener

This subscriber listens to form events to automatically run filtering on the attached entity, like Validation is done.
Inheritance: implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Datei anzeigen Open project: rdohms/dms-filter-bundle Class Usage Examples

Protected Properties

Property Type Description
$filterService DMS\Bundle\FilterBundle\Service\Filter

Public Methods

Method Description
__construct ( Filter $filterService )
getRootFormCascadeOption ( Symfony\Component\Form\FormInterface $form ) : boolean Navigates to the Root form to define if cascading should be done.
getSubscribedEvents ( )
onPostSubmit ( Symfony\Component\Form\FormEvent $event ) Listens to the Post Bind event and triggers filtering if adequate.

Method Details

__construct() public method

public __construct ( Filter $filterService )
$filterService DMS\Bundle\FilterBundle\Service\Filter

getRootFormCascadeOption() public method

Navigates to the Root form to define if cascading should be done.
public getRootFormCascadeOption ( Symfony\Component\Form\FormInterface $form ) : boolean
$form Symfony\Component\Form\FormInterface
return boolean

getSubscribedEvents() public static method

public static getSubscribedEvents ( )

onPostSubmit() public method

POST_SUBMIT is fired for every level of the form, from fields to embedded forms. this method will filter any level that returns an entity, or will only filter the root entity if 'cascade_filter' is set to false.
public onPostSubmit ( Symfony\Component\Form\FormEvent $event )
$event Symfony\Component\Form\FormEvent

Property Details

$filterService protected_oe property

protected Filter,DMS\Bundle\FilterBundle\Service $filterService
return DMS\Bundle\FilterBundle\Service\Filter