@@ -98,15 +98,20 @@ public function getViewId(): ?int
9898 public function getQueryParams (): array
9999 {
100100 $ query = [];
101-
102- if ($ this ->getFilters ()) {
103- $ query = $ this ->getFilters ();
104- }
105- if ($ this ->getFields ()) {
106- $ query ['fields ' ] = implode (', ' , $ this ->getFields ());
107- }
108- if ($ this ->getInclude ()) {
109- $ query ['include ' ] = implode (', ' , $ this ->getInclude ());
101+ $ filters = $ this ->getFilters ();
102+
103+ if ($ filters ) {
104+ $ query = $ filters ;
105+ } else {
106+ if ($ this ->getFields ()) {
107+ $ query ['fields ' ] = implode (', ' , $ this ->getFields ());
108+ }
109+ if ($ this ->getInclude ()) {
110+ $ query ['include ' ] = implode (', ' , $ this ->getInclude ());
111+ }
112+ if ($ this ->getViewId ()) {
113+ $ query ['viewId ' ] = $ this ->getViewId ();
114+ }
110115 }
111116 if ($ this ->getFrom ()) {
112117 $ query ['from ' ] = $ this ->getFrom ();
@@ -117,9 +122,6 @@ public function getQueryParams(): array
117122 if ($ this ->getSortBy ()) {
118123 $ query ['sortBy ' ] = ($ this ->getSortOrder () === 'DESC ' ? '- ' : '' ) . $ this ->getSortBy ();
119124 }
120- if ($ this ->getViewId ()) {
121- $ query ['viewId ' ] = $ this ->getViewId ();
122- }
123125
124126 return $ query ;
125127 }
0 commit comments