Add basic workflow step saving to workflow update API
[MAILPOET-4420]
This commit is contained in:
@@ -21,6 +21,7 @@ class Exceptions {
|
||||
private const SUBJECT_NOT_FOUND = 'mailpoet_automation_subject_not_found';
|
||||
private const SUBJECT_LOAD_FAILED = 'mailpoet_automation_workflow_subject_load_failed';
|
||||
private const MULTIPLE_SUBJECTS_FOUND = 'mailpoet_automation_multiple_subjects_found';
|
||||
private const WORKFLOW_STRUCTURE_MODIFICATION_NOT_SUPPORTED = 'mailpoet_automation_workflow_structure_modification_not_supported';
|
||||
|
||||
public function __construct() {
|
||||
throw new InvalidStateException(
|
||||
@@ -112,4 +113,10 @@ class Exceptions {
|
||||
->withErrorCode(self::MULTIPLE_SUBJECTS_FOUND)
|
||||
->withMessage(__(sprintf("Multiple subjects with key '%s' found, only one expected.", $key), 'mailpoet'));
|
||||
}
|
||||
|
||||
public static function workflowStructureModificationNotSupported(): UnexpectedValueException {
|
||||
return UnexpectedValueException::create()
|
||||
->withErrorCode(self::WORKFLOW_STRUCTURE_MODIFICATION_NOT_SUPPORTED)
|
||||
->withMessage(__("Workflow structure modification not supported.", 'mailpoet'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user