Create templated workflows in draft status

MAILPOET-4264
This commit is contained in:
John Oleksowicz
2022-06-02 15:35:02 -05:00
committed by Veljko V
parent 25b9f3a876
commit 2bf59eab9a
4 changed files with 21 additions and 1 deletions

View File

@ -8,6 +8,7 @@ use MailPoet\Automation\Engine\Utils\Json;
class Workflow {
public const STATUS_ACTIVE = 'active';
public const STATUS_INACTIVE = 'inactive';
public const STATUS_DRAFT = 'draft';
/** @var int */
private $id;
@ -55,6 +56,10 @@ class Workflow {
return $this->status;
}
public function setDraft(): void {
$this->status = self::STATUS_DRAFT;
}
public function getCreatedAt(): DateTimeImmutable {
return $this->createdAt;
}