aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/WizardPart.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classes/WizardPart.php')
-rw-r--r--lib/classes/WizardPart.php23
1 files changed, 20 insertions, 3 deletions
diff --git a/lib/classes/WizardPart.php b/lib/classes/WizardPart.php
index a932ce9..abf3144 100644
--- a/lib/classes/WizardPart.php
+++ b/lib/classes/WizardPart.php
@@ -19,6 +19,7 @@ use Stringable,
final class WizardPart implements Stringable, JsonSerializable
{
+ private string $id;
private string $type;
private Form|VueApp $content;
private string $title;
@@ -27,19 +28,25 @@ final class WizardPart implements Stringable, JsonSerializable
/**
* Creates a vue app with the given relative path to the app component.
*/
- public static function create(Form|VueApp $content, string $title = '', string $iconShape = ''): WizardPart
+ public static function create(string $id, Form|VueApp $content, string $title = '', string $iconShape = ''): WizardPart
{
- return new static($content, $title, $iconShape);
+ return new static($id, $content, $title, $iconShape);
}
- public function __construct(Form|VueApp $content, string $title = '', string $iconShape = '')
+ public function __construct(string $id, Form|VueApp $content, string $title = '', string $iconShape = '')
{
+ $this->id = $id;
$this->type = get_class($content);
$this->content = $content;
$this->title = $title;
$this->iconShape = $iconShape;
}
+ public function getId(): string
+ {
+ return $this->id;
+ }
+
public function getType(): string
{
return $this->type;
@@ -50,6 +57,16 @@ final class WizardPart implements Stringable, JsonSerializable
return $this->title;
}
+ public function getContent() {
+ return $this->content;
+ }
+
+ public function setId(string $id): WizardPart
+ {
+ $this->id = $id;
+ return $this;
+ }
+
public function setTitle(string $title): WizardPart
{
$this->title = $title;