Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Update code to reflect changes in template layer #556

Merged

Conversation

GuySartorelli
Copy link
Collaborator

@GuySartorelli GuySartorelli marked this pull request as draft October 10, 2024 22:48
@GuySartorelli GuySartorelli force-pushed the pulls/7/refactor-template-layer branch 2 times, most recently from cf4085c to 18db146 Compare October 14, 2024 03:02
@GuySartorelli GuySartorelli force-pushed the pulls/7/refactor-template-layer branch from 18db146 to fe97782 Compare October 22, 2024 00:11
@GuySartorelli GuySartorelli marked this pull request as ready for review October 23, 2024 03:01
@@ -134,10 +136,7 @@ public function execute(WorkflowInstance $workflow)
]);
}


$view = SSViewer::fromString($this->EmailTemplate);
$this->extend('updateView', $view);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what anyone would have used that extension point for, but it wouldn't be useful now we're not using SSViewer at all anyway.

@@ -146,7 +145,7 @@ public function execute(WorkflowInstance $workflow)
$item->Assignee = ArrayData::create($assigneeVars);
}

$body = $view->process($item);
$body = $engine->renderString($this->EmailTemplate, ViewLayerData::create($item));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The EmailTemplate value isn't hardcoded, so could be updated at a project level to be whatever template syntax the devs want to use, therefore use TemplateEngine not explicitly SSTemplateEngine

@emteknetnz emteknetnz merged commit 13d1eaa into symbiote:7 Oct 30, 2024
4 of 9 checks passed
@emteknetnz emteknetnz deleted the pulls/7/refactor-template-layer branch October 30, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants