-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #576 from magento-performance/ACPT-1665
ACPT-1665:Fix searchConfig merge in SearchCriteriaBuilder
- Loading branch information
Showing
3 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
app/code/Magento/CatalogGraphQl/DataProvider/Product/RequestDataBuilder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
namespace Magento\CatalogGraphQl\DataProvider\Product; | ||
|
||
use Magento\Framework\ObjectManager\ResetAfterRequestInterface; | ||
|
||
/** | ||
* Builds request specific Product Search Query | ||
*/ | ||
class RequestDataBuilder implements ResetAfterRequestInterface | ||
{ | ||
private array $data; | ||
|
||
public function __construct() | ||
{ | ||
$this->_resetState(); | ||
} | ||
|
||
public function setData($data) | ||
{ | ||
$this->data = $data; | ||
} | ||
|
||
public function getData(string $key) | ||
{ | ||
return $this->data[$key] ?? null; | ||
|
||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function _resetState(): void | ||
{ | ||
$this->data = []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters