How to get the custom email templates list in magento2
-
08-03-2021 - |
문제
How to get custom email templates list collection in magento2. how to get the collection
해결책
It is working for me.
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$alltemplele = $objectManager->get('\Magento\Email\Model\ResourceModel\Template\Collection');
$alltemplele = $alltemplele->toOptionArray();
print_r($alltemplele_data);
다른 팁
try with below code for get email templates :
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$alltemplele = $objectManager->get('\Magento\Email\Model\ResourceModel\Template\Collection');
$alltemplele_data = $alltemplele->toOptionArray();;
print_r($alltemplele_data);
i hope its work for you.
제휴하지 않습니다 magento.stackexchange