Save and load workflows in the new format, update API

[MAILPOET-4523]
This commit is contained in:
Jan Jakes
2022-09-08 15:50:25 +02:00
committed by John Oleksowicz
parent 9028ea96ec
commit 1677cc2842
11 changed files with 126 additions and 82 deletions

View File

@@ -0,0 +1,28 @@
<?php declare(strict_types = 1);
namespace MailPoet\Automation\Engine\Data;
class NextStep {
/** @var string */
protected $id;
public function __construct(
string $id
) {
$this->id = $id;
}
public function getId(): string {
return $this->id;
}
public function toArray(): array {
return [
'id' => $this->id,
];
}
public static function fromArray(array $data): self {
return new self($data['id']);
}
}