From 36de873783d0c5fad19ed6d470395c43c0616e30 Mon Sep 17 00:00:00 2001 From: Igor Manjencic Date: Wed, 13 Dec 2023 11:56:12 +0100 Subject: [PATCH] feat(ZMS-1711): custom scope template --- zmsentities/src/Zmsentities/Helper/Messaging.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zmsentities/src/Zmsentities/Helper/Messaging.php b/zmsentities/src/Zmsentities/Helper/Messaging.php index af673258a..bcaa12942 100644 --- a/zmsentities/src/Zmsentities/Helper/Messaging.php +++ b/zmsentities/src/Zmsentities/Helper/Messaging.php @@ -196,12 +196,12 @@ public static function getNotificationContent(Process $process, Config $config, protected static function getTemplate($type, $status, ?Process $process = null) { if ($process) { - $providerName = $process->getCurrentScope()->getProvider()->getName(); - $providerName = str_replace(['(', ')', '/'], '', $providerName); - $providerTemplate = 'custom/' . $type . '/' . $status . '/' . $providerName . '.twig'; + $scopeName = $process->getCurrentScope()->getName(); + $scopeName = str_replace(['(', ')', '/'], '', $scopeName); + $scopeTemplate = 'custom/' . $type . '/' . $status . '/' . $scopeName . '.twig'; - if (file_exists(TemplateFinder::getTemplatePath() . '/messaging/' . $providerTemplate)) { - return $providerTemplate; + if (file_exists(TemplateFinder::getTemplatePath() . '/messaging/' . $scopeTemplate)) { + return $scopeTemplate; } }