Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ReaderPlugin.php
Go to the documentation of this file.
1 <?php
7 
13 {
17  private $requestGenerator;
18 
22  public function __construct(
23  \Magento\CatalogSearch\Model\Search\RequestGenerator $requestGenerator
24  ) {
25  $this->requestGenerator = $requestGenerator;
26  }
27 
37  public function afterRead(
38  \Magento\Framework\Config\ReaderInterface $subject,
39  array $result,
40  $scope = null
41  ) {
42  $result = array_merge_recursive($result, $this->requestGenerator->generate());
43  return $result;
44  }
45 }
afterRead(\Magento\Framework\Config\ReaderInterface $subject, array $result, $scope=null)
__construct(\Magento\CatalogSearch\Model\Search\RequestGenerator $requestGenerator)