1414 * @license http://www.pimcore.org/license GPLv3 and PCL
1515 */
1616
17- namespace Pimcore \Bundle \StudioBackendBundle \DataIndex \Filter \ Asset \ System ;
17+ namespace Pimcore \Bundle \StudioBackendBundle \DataIndex \Filter ;
1818
1919use Pimcore \Bundle \StudioBackendBundle \DataIndex \Filter \Asset \IsAssetFilterTrait ;
20- use Pimcore \Bundle \StudioBackendBundle \DataIndex \Filter \FilterInterface ;
21- use Pimcore \Bundle \StudioBackendBundle \DataIndex \Query \AssetQueryInterface ;
2220use Pimcore \Bundle \StudioBackendBundle \DataIndex \Query \QueryInterface ;
2321use Pimcore \Bundle \StudioBackendBundle \Exception \Api \InvalidArgumentException ;
2422use Pimcore \Bundle \StudioBackendBundle \Grid \Column \ColumnType ;
@@ -35,20 +33,19 @@ final class StringFilter implements FilterInterface
3533 public function apply (mixed $ parameters , QueryInterface $ query ): QueryInterface
3634 {
3735 $ parameters = $ this ->validateParameterType ($ parameters );
38- $ assetQuery = $ this ->validateQueryType ($ query );
3936
40- if (!$ parameters || ! $ assetQuery ) {
37+ if (!$ parameters ) {
4138 return $ query ;
4239 }
4340
4441 foreach ($ parameters ->getColumnFilterByType (ColumnType::SYSTEM_STRING ->value ) as $ column ) {
45- $ assetQuery = $ this ->applyStringFilter ($ column , $ assetQuery );
42+ $ query = $ this ->applyStringFilter ($ column , $ query );
4643 }
4744
48- return $ assetQuery ;
45+ return $ query ;
4946 }
5047
51- private function applyStringFilter (ColumnFilter $ column , AssetQueryInterface $ query ): AssetQueryInterface
48+ private function applyStringFilter (ColumnFilter $ column , QueryInterface $ query ): QueryInterface
5249 {
5350 if (!is_string ($ column ->getFilterValue ())) {
5451 throw new InvalidArgumentException ('Filter value for this filter must be a string ' );
0 commit comments