Save and load workflows in the new format, update API
[MAILPOET-4523]
This commit is contained in:
committed by
John Oleksowicz
parent
9028ea96ec
commit
1677cc2842
28
mailpoet/lib/Automation/Engine/Data/NextStep.php
Normal file
28
mailpoet/lib/Automation/Engine/Data/NextStep.php
Normal 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']);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user