@@ -54,6 +54,15 @@ class FaqCreateQuestion implements ResolverInterface
5454 */
5555 private $ _transportBuilder ;
5656
57+ /**
58+ * FaqCreateQuestion constructor.
59+ * @param \Magento\Framework\View\LayoutInterface $layout
60+ * @param \Magento\Store\Model\StoreManager $storeManager
61+ * @param \Lof\Faq\Model\QuestionFactory $questionFactory
62+ * @param \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation
63+ * @param \Lof\Faq\Helper\Data $faqHelper
64+ * @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
65+ */
5766 public function __construct (
5867 \Magento \Framework \View \LayoutInterface $ layout ,
5968 \Magento \Store \Model \StoreManager $ storeManager ,
@@ -67,7 +76,7 @@ public function __construct(
6776 $ this ->questionFactory = $ questionFactory ;
6877 $ this ->inlineTranslation = $ inlineTranslation ;
6978 $ this ->_faqHelper = $ faqHelper ;
70- $ this ->_transportBuilder = $ transportBuilder ;
79+ $ this ->_transportBuilder = $ transportBuilder ;
7180 }
7281
7382 /**
@@ -117,10 +126,10 @@ public function resolve(
117126 $ this ->inlineTranslation ->suspend ();
118127 $ enable_testmode = $ this ->_faqHelper ->getConfig ('email_settings/enable_testmode ' );
119128 if (!$ enable_testmode && $ this ->_faqHelper ->getConfig ('email_settings/email_receive ' ) != '' ) {
120- // $data['message'] = $this->_layout->createBlock(\Magento\Framework\View\Element\Template::class)
121- // ->setTemplate("Lof_Faq::email/items.phtml")
122- // ->setCustomFormData($custom_form_data)
123- // ->toHtml();
129+ $ data ['message ' ] = $ this ->_layout ->createBlock (\Magento \Framework \View \Element \Template::class)
130+ ->setTemplate ("Lof_Faq::email/items.phtml " )
131+ ->setCustomFormData ($ custom_form_data )
132+ ->toHtml ();
124133 $ emails = $ this ->_faqHelper ->getConfig ('email_settings/email_receive ' );
125134 $ emails = explode (', ' , $ emails );
126135 foreach ($ emails as $ v ) {
0 commit comments