Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Placeholder.php
Go to the documentation of this file.
1 <?php
9 
11 use Magento\Store\Model\Config\Placeholder as ConfigPlaceholder;
12 
17 {
21  private $configPlaceholder;
22 
27  public function __construct(ConfigPlaceholder $configPlaceholder)
28  {
29  $this->configPlaceholder = $configPlaceholder;
30  }
31 
35  public function process(array $data)
36  {
37  foreach ($data as $scope => &$scopeData) {
38  if ($scope === 'default') {
39  $scopeData = $this->configPlaceholder->process($scopeData);
40  } else {
41  foreach ($scopeData as &$sData) {
42  $sData = $this->configPlaceholder->process($sData);
43  }
44  }
45  }
46 
47  return $data;
48  }
49 }
__construct(ConfigPlaceholder $configPlaceholder)
Definition: Placeholder.php:27