Skip to content

Commit

Permalink
Merge pull request #40 from rdohms/fix-auto-filter
Browse files Browse the repository at this point in the history
Fix auto-filtering
  • Loading branch information
rdohms authored Jul 13, 2018
2 parents a55bd9d + 8f837d2 commit 13994b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/DMS/Bundle/FilterBundle/Form/FilterExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(Filter $filterService, $autoFilter)
protected function loadTypeExtensions()
{
return array(
new FormTypeFilterExtension($this->filter, true),
new FormTypeFilterExtension($this->filter, $this->autoFilter),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ public function testFilterSubscriberDisabled()
$dispatcher = $form->getConfig()->getEventDispatcher();

$listeners = $dispatcher->getListeners(FormEvents::POST_SUBMIT);
$filter = function ($value) {
return (get_class($value[0]) == "DMS\Bundle\FilterBundle\Form\EventListener\DelegatingFilterListener");
};

$filterListeners = array_filter($listeners, $filter);

$this->assertEquals(0, count($filterListeners));
}

public function testBindValidatesData()
Expand Down

0 comments on commit 13994b8

Please sign in to comment.