diff --git a/src/Entities/Properties/Select.php b/src/Entities/Properties/Select.php index d950c1b..831b772 100644 --- a/src/Entities/Properties/Select.php +++ b/src/Entities/Properties/Select.php @@ -17,6 +17,28 @@ class Select extends Property implements Modifiable */ private Collection $options; + + /** + * @param $id + * @return Select + */ + public static function id(string $id): Select + { + $selectProperty = new Select(); + + $selectItem = new SelectItem(); + $selectItem->setId($id); + $selectProperty->content = $selectItem; + + $selectProperty->rawContent = [ + 'select' => [ + 'id' => $selectItem->getId(), + ], + ]; + + return $selectProperty; + } + /** * @param $name * @return Select