public function __construct(OptionType $type) { parent::__construct($type); $this->entityDTO->isSelect = $this->entity->isSelect(); $this->entityDTO->isRadio = $this->entity->isRadio(); $this->entityDTO->isCheckbox = $this->entity->isCheckbox(); }
public static function setFromDTO(Option &$option, OptionDTO $optionDTO) { $option->setName($optionDTO->name); $option->setDescription($optionDTO->description); $option->setSortOrder($optionDTO->sortOrder); if ($optionDTO->type !== null) { $option->setType(OptionType::createById($optionDTO->type->id)); } }
public function __construct(UuidInterface $id = null) { $this->setId($id); $this->setCreated(); $this->setType(OptionType::select()); $this->tags = new ArrayCollection(); $this->optionProducts = new ArrayCollection(); $this->optionValues = new ArrayCollection(); $this->sortOrder = 0; }
public function getOptionType() { return OptionType::select(); }
public function testCreateByIdThrowsExceptionWhenInvalid() { $this->setExpectedException(InvalidArgumentException::class); OptionType::createById(999); }