Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ShipBundleItems.php
Go to the documentation of this file.
1 <?php
6 declare(strict_types=1);
7 
9 
15 
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 = isset($value['shipment_type']) && $value['type_id'] === Bundle::TYPE_CODE
45  ? $this->enumLookup->getEnumValueFromField('ShipBundleItemsEnum', $value['shipment_type']) : null;
46 
47  return $result;
48  }
49 }
resolve(Field $field, $context, ResolveInfo $info, array $value=null, array $args=null)
$value
Definition: gender.phtml:16
foreach( $_productCollection as $_product)() ?>" class $info
Definition: listing.phtml:52