Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PriceView.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
15 
19 class PriceView implements ResolverInterface
20 {
24  private $enumLookup;
25 
29  public function __construct(EnumLookup $enumLookup)
30  {
31  $this->enumLookup = $enumLookup;
32  }
33 
37  public function resolve(
38  Field $field,
39  $context,
41  array $value = null,
42  array $args = null
43  ) {
44  $result = null;
45  if ($value['type_id'] === Bundle::TYPE_CODE) {
46  $result = isset($value['price_view'])
47  ? $this->enumLookup->getEnumValueFromField('PriceViewEnum', $value['price_view']) : null;
48  }
49 
50  return $result;
51  }
52 }
resolve(Field $field, $context, ResolveInfo $info, array $value=null, array $args=null)
Definition: PriceView.php:37
$value
Definition: gender.phtml:16
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52