Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
OrderGridUpdater.php
Go to the documentation of this file.
1 <?php
7 
10 
17 {
21  private $globalConfig;
22 
26  private $entityGrid;
27 
32  public function __construct(
33  GridInterface $entityGrid,
34  ScopeConfigInterface $globalConfig
35  ) {
36  $this->globalConfig = $globalConfig;
37  $this->entityGrid = $entityGrid;
38  }
39 
49  public function update($orderId)
50  {
51  if (!$this->globalConfig->getValue('dev/grid/async_indexing')) {
52  $this->entityGrid->refresh($orderId);
53  }
54  }
55 }
__construct(GridInterface $entityGrid, ScopeConfigInterface $globalConfig)