Change default workflow status to draft
MAILPOET-4264
This commit is contained in:
committed by
Veljko V
parent
2bf59eab9a
commit
12b677ce5e
@ -34,7 +34,6 @@ class CreateWorkflowFromTemplateController {
|
|||||||
throw UnexpectedValueException::create()->withMessage('Template not found.');
|
throw UnexpectedValueException::create()->withMessage('Template not found.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$workflow->setDraft();
|
|
||||||
$this->storage->createWorkflow($workflow);
|
$this->storage->createWorkflow($workflow);
|
||||||
return $workflow;
|
return $workflow;
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ class Workflow {
|
|||||||
private $name;
|
private $name;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $status = self::STATUS_INACTIVE;
|
private $status = self::STATUS_DRAFT;
|
||||||
|
|
||||||
/** @var DateTimeImmutable */
|
/** @var DateTimeImmutable */
|
||||||
private $createdAt;
|
private $createdAt;
|
||||||
@ -56,10 +56,6 @@ class Workflow {
|
|||||||
return $this->status;
|
return $this->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setDraft(): void {
|
|
||||||
$this->status = self::STATUS_DRAFT;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCreatedAt(): DateTimeImmutable {
|
public function getCreatedAt(): DateTimeImmutable {
|
||||||
return $this->createdAt;
|
return $this->createdAt;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user