Skip to content

Commit

Permalink
CallbackFilter - Fix return type (#7791)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome-fix authored Apr 21, 2022
1 parent e6eefc2 commit aca5cca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/reference/action_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ If you have the **SonataDoctrineORMAdminBundle** installed you can use the
]);
}

public function getFullTextFilter(ProxyQueryInterface $query, string $alias, string $field, FilterData $data): void
public function getFullTextFilter(ProxyQueryInterface $query, string $alias, string $field, FilterData $data): bool
{
if (!$data->hasValue()) {
return false;
Expand All @@ -631,10 +631,10 @@ type of your condition(s)::

final class UserAdmin extends Sonata\UserBundle\Admin\Model\UserAdmin
{
public function getFullTextFilter(ProxyQueryInterface $query, string $alias, string $field, FilterData $data): void
public function getFullTextFilter(ProxyQueryInterface $query, string $alias, string $field, FilterData $data): bool
{
if (!$data->hasValue()) {
return;
return false;
}

$operator = $data->isType(EqualType::TYPE_IS_EQUAL) ? '=' : '!=';
Expand Down

0 comments on commit aca5cca

Please sign in to comment.