Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ValueProcessor.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
16 
20  public function __construct(
22  ) {
23  $this->backendModelFactory = $backendModelFactory;
24  }
25 
35  public function process($value, $scope, $scopeId, array $fieldConfig)
36  {
37  $backendModel = $this->backendModelFactory->createByPath(
38  $fieldConfig['path'],
39  [
40  'value' => $value,
41  'field_config' => $fieldConfig,
42  'scope' => $scope,
43  'scope_id' => $scopeId
44  ]
45  );
46  $backendModel->afterLoad();
47  return $backendModel->getValue();
48  }
49 }
$value
Definition: gender.phtml:16
process($value, $scope, $scopeId, array $fieldConfig)
__construct(BackendModelFactory $backendModelFactory)