Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ProductFieldMapperProxy.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  private $clientResolver;
20 
24  private $productFieldMappers;
25 
31  public function __construct(
32  ClientResolver $clientResolver,
33  array $productFieldMappers
34  ) {
35  $this->clientResolver = $clientResolver;
36  $this->productFieldMappers = $productFieldMappers;
37  }
38 
42  private function getProductFieldMapper()
43  {
44  return $this->productFieldMappers[$this->clientResolver->getCurrentEngine()];
45  }
46 
55  public function getFieldName($attributeCode, $context = [])
56  {
57  return $this->getProductFieldMapper()->getFieldName($attributeCode, $context);
58  }
59 
67  public function getAllAttributesTypes($context = [])
68  {
69  return $this->getProductFieldMapper()->getAllAttributesTypes($context);
70  }
71 }
$attributeCode
Definition: extend.phtml:12