File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
dev/tests/integration/framework/Magento/TestFramework/Catalog/Model/Layer Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -34,13 +34,17 @@ public function __construct(
34
34
*
35
35
* @param string $query
36
36
* @param string $sortOrder
37
+ * @param string $sortedField
37
38
* @return Collection
38
39
*/
39
- public function execute (string $ query , string $ sortOrder = 'desc ' ): Collection
40
- {
40
+ public function execute (
41
+ string $ query ,
42
+ string $ sortedField = 'relevance ' ,
43
+ string $ sortOrder = 'desc '
44
+ ): Collection {
41
45
$ productCollection = $ this ->searchFactory ->create ()->getProductCollection ();
42
46
$ productCollection ->addSearchFilter ($ query );
43
- $ productCollection ->setOrder (' relevance ' , $ sortOrder );
47
+ $ productCollection ->setOrder ($ sortedField , $ sortOrder );
44
48
45
49
return $ productCollection ;
46
50
}
You can’t perform that action at this time.
0 commit comments