public function handle(UpdateOptionValueCommand $command) { $optionValueDTO = $command->getOptionValueDTO(); $optionValue = $this->optionService->getOptionValueById($optionValueDTO->id); OptionValueDTOBuilder::setFromDTO($optionValue, $optionValueDTO); $this->optionService->updateOptionValue($optionValue); }
public function handle(DeleteOptionValueCommand $command) { $optionValue = $this->optionService->getOptionValueById($command->getOptionValueId()); $this->optionService->deleteOptionValue($optionValue); }