feat: instant preview of edited email template
This commit is contained in:
1 parent
489aafed3e
commit
0e1df6da7c
12 files changed
+250
-58
No files matched your search
@@ -28,4 +28,18 @@ readonly class EmailTextDefinition
|
||||
{
|
||||
return array_keys($this->placeholders);
|
||||
}
|
||||
|
||||
/**
|
||||
* Placeholder values for the admin preview, where the placeholders stand in for
|
||||
* themselves: no disposition is at hand there, and a visible [destination] tells an
|
||||
* admin where a real value lands better than an invented one would.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function getSamplePlaceholders(): array
|
||||
{
|
||||
$names = $this->getPlaceholderNames();
|
||||
|
||||
return array_combine($names, array_map(static fn (string $name): string => '['.$name.']', $names));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user