Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ReadHandler.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  private $optionRepository;
20 
26  public function __construct(OptionRepository $optionRepository)
27  {
28  $this->optionRepository = $optionRepository;
29  }
30 
37  public function execute($entity, $arguments = [])
38  {
41  return $entity;
42  }
43  $entityExtension = $entity->getExtensionAttributes();
44  $options = $this->optionRepository->getListByProduct($entity);
45  if ($options) {
46  $entityExtension->setBundleProductOptions($options);
47  }
48  $entity->setExtensionAttributes($entityExtension);
49  return $entity;
50  }
51 }
__construct(OptionRepository $optionRepository)
Definition: ReadHandler.php:26
$entity
Definition: element.phtml:22
$arguments