Exemplo n.º 1
0
 /**
  * @return static
  */
 public function withOptionValues()
 {
     foreach ($this->entity->getOptionValues() as $optionValue) {
         $this->entityDTO->optionValues[] = $this->dtoBuilderFactory->getOptionValueDTOBuilder($optionValue)->withPrice()->build();
     }
     return $this;
 }
 public function __construct(CartItemOptionValue $cartItemOptionValue, DTOBuilderFactoryInterface $dtoBuilderFactory)
 {
     $this->entity = $cartItemOptionValue;
     $this->dtoBuilderFactory = $dtoBuilderFactory;
     $this->entityDTO = new CartItemOptionValueDTO();
     $this->setId();
     $this->setTime();
     $this->entityDTO->optionValue = $this->dtoBuilderFactory->getOptionValueDTOBuilder($this->entity->getOptionValue())->withAllData()->build();
 }
 /**
  * @return static
  */
 public function withOptionValue()
 {
     $this->entityDTO->optionValue = $this->dtoBuilderFactory->getOptionValueDTOBuilder($this->entity->getOptionValue())->withOption()->build();
     return $this;
 }