diff --git a/src/CoreBundle/Entity/Message.php b/src/CoreBundle/Entity/Message.php index 3c2469e836c..2634faf8135 100644 --- a/src/CoreBundle/Entity/Message.php +++ b/src/CoreBundle/Entity/Message.php @@ -16,7 +16,7 @@ use ApiPlatform\Metadata\GetCollection; use ApiPlatform\Metadata\Post; use ApiPlatform\Metadata\Put; -use Chamilo\CoreBundle\Filter\SearchOr; +use Chamilo\CoreBundle\Filter\SearchOrFilter; use Chamilo\CoreBundle\Repository\MessageRepository; use Chamilo\CoreBundle\State\MessageByGroupStateProvider; use Chamilo\CoreBundle\State\MessageProcessor; @@ -77,7 +77,7 @@ BooleanFilter::class, properties: ['receivers.read'] )] -#[ApiFilter(SearchOr::class, properties: ['title', 'content'])] +#[ApiFilter(SearchOrFilter::class, properties: ['title', 'content'])] class Message { public const MESSAGE_TYPE_INBOX = 1; diff --git a/src/CoreBundle/Entity/User.php b/src/CoreBundle/Entity/User.php index 32425ad1f12..4f957e9ad42 100644 --- a/src/CoreBundle/Entity/User.php +++ b/src/CoreBundle/Entity/User.php @@ -18,7 +18,7 @@ use ApiPlatform\Metadata\Put; use Chamilo\CoreBundle\Controller\Api\UserSkillsController; use Chamilo\CoreBundle\Entity\Listener\UserListener; -use Chamilo\CoreBundle\Filter\SearchOr; +use Chamilo\CoreBundle\Filter\SearchOrFilter; use Chamilo\CoreBundle\Repository\Node\UserRepository; use Chamilo\CoreBundle\Traits\UserCreatorTrait; use Chamilo\CourseBundle\Entity\CGroupRelTutor; @@ -78,7 +78,7 @@ 'lastname' => 'partial', ] )] -#[ApiFilter(SearchOr::class, properties: ['username', 'firstname', 'lastname'])] +#[ApiFilter(SearchOrFilter::class, properties: ['username', 'firstname', 'lastname'])] #[ApiFilter(filterClass: BooleanFilter::class, properties: ['isActive'])] class User implements UserInterface, EquatableInterface, ResourceInterface, ResourceIllustrationInterface, PasswordAuthenticatedUserInterface, LegacyPasswordAuthenticatedUserInterface, ExtraFieldItemInterface, Stringable { diff --git a/src/CoreBundle/Filter/SearchOr.php b/src/CoreBundle/Filter/SearchOrFilter.php similarity index 90% rename from src/CoreBundle/Filter/SearchOr.php rename to src/CoreBundle/Filter/SearchOrFilter.php index 2112acd34e7..f2049969db9 100644 --- a/src/CoreBundle/Filter/SearchOr.php +++ b/src/CoreBundle/Filter/SearchOrFilter.php @@ -1,9 +1,9 @@ null, 'type' => 'string', 'required' => false, - 'description' => 'Do a "Search OR" across multiple fields', + 'description' => 'It does a "Search OR" using `LIKE %text%` to search for fields that contain `text`', ], ]; }