22 if (count(
$template->getSystemConfigPathsWhereCurrentlyUsed()) == 0) {
25 $this->messageManager->addSuccessMessage(
__(
'You deleted the email template.'));
26 $this->_objectManager->get(\
Magento\Framework\
App\ReinitableConfig::class)->reinit();
32 $this->messageManager->addErrorMessage(
__(
'The email template is currently being used.'));
36 }
catch (\
Magento\Framework\Exception\LocalizedException $e) {
37 $this->messageManager->addErrorMessage($e->getMessage());
38 }
catch (\Exception $e) {
39 $this->messageManager->addErrorMessage(
40 __(
'We can\'t delete email template data right now. Please review log and try again.')
42 $this->_objectManager->get(\Psr\Log\LoggerInterface::class)->critical($e);
44 $this->_objectManager->get(
45 \
Magento\Backend\Model\Session::class
55 $this->messageManager->addErrorMessage(
__(
'We can\'t find an email template to delete.'));
_initTemplate($idFieldName='template_id')
_redirect($path, $arguments=[])