/** * @param string $name * @param string $description * @param int $sortOrder * @param int $textOptionTypeId */ public function __construct($name, $description, $sortOrder, $textOptionTypeId) { $this->textOptionId = Uuid::uuid4(); $this->name = (string) $name; $this->description = (string) $description; $this->sortOrder = (int) $sortOrder; $this->textOptionType = TextOptionType::createById($textOptionTypeId); }
public function __construct(UuidInterface $id = null) { $this->setId($id); $this->setCreated(); $this->tags = new ArrayCollection(); $this->sortOrder = 0; $this->setType(TextOptionType::text()); }
public function __construct(TextOptionType $type) { parent::__construct($type); $this->entityDTO->isText = $this->entity->isText(); $this->entityDTO->isTextarea = $this->entity->isTextarea(); $this->entityDTO->isFile = $this->entity->isFile(); $this->entityDTO->isDate = $this->entity->isDate(); $this->entityDTO->isTime = $this->entity->isTime(); $this->entityDTO->isDateTime = $this->entity->isDateTime(); }
public function getTextOptionType() { return TextOptionType::textarea(); }
public function testCreateByIdThrowsExceptionWhenInvalid() { $this->setExpectedException(InvalidArgumentException::class); TextOptionType::createById(999); }