Skip to content

Commit

Permalink
fix entitty filter bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed May 4, 2021
1 parent 4c5f0ed commit 8f5c1a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/Component/EntityFilter/Manager.php
Expand Up @@ -47,12 +47,12 @@ public function __call(string $method, array $arguments = [])
$method = 'get'.ucfirst($method);
}

$returnValue = $arguments ? \call_user_func_array([$this->entity, $method], $arguments)
: \call_user_func([$this->entity, $method]);

$event = new FilterEvent($this, substr($method, 3));
$this->eventDispatcher->dispatch($event, FilterEvent::NAME_BEFORE);

$returnValue = $arguments ? \call_user_func_array([$this->entity, $method], $arguments)
: \call_user_func([$this->entity, $method]);

$returnValue = $this->filter(substr($method, 3), $returnValue);

$this->eventDispatcher->dispatch($event, FilterEvent::NAME_AFTER);
Expand Down

0 comments on commit 8f5c1a0

Please sign in to comment.