public function handle(UpdateOptionProductCommand $command) { $optionProductDTO = $command->getOptionProductDTO(); $optionProduct = $this->optionService->getOptionProductById($optionProductDTO->id); OptionProductDTOBuilder::setFromDTO($optionProduct, $optionProductDTO); $this->optionService->updateOptionProduct($optionProduct); }
public function handle(DeleteOptionProductCommand $command) { $optionProduct = $this->optionService->getOptionProductById($command->getOptionProductId()); $this->optionService->deleteOptionProduct($optionProduct); }