Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
InvoiceCommentIdentity.php
Go to the documentation of this file.
1 <?php
7 
9 {
10  const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/invoice_comment/copy_method';
11  const XML_PATH_EMAIL_COPY_TO = 'sales_email/invoice_comment/copy_to';
12  const XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/invoice_comment/guest_template';
13  const XML_PATH_EMAIL_TEMPLATE = 'sales_email/invoice_comment/template';
14  const XML_PATH_EMAIL_IDENTITY = 'sales_email/invoice_comment/identity';
15  const XML_PATH_EMAIL_ENABLED = 'sales_email/invoice_comment/enabled';
16 
20  public function isEnabled()
21  {
22  return $this->scopeConfig->isSetFlag(
23  self::XML_PATH_EMAIL_ENABLED,
24  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
25  $this->getStore()->getStoreId()
26  );
27  }
28 
32  public function getEmailCopyTo()
33  {
34  $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());
35  if (!empty($data)) {
36  return explode(',', $data);
37  }
38  return false;
39  }
40 
44  public function getCopyMethod()
45  {
46  return $this->getConfigValue(self::XML_PATH_EMAIL_COPY_METHOD, $this->getStore()->getStoreId());
47  }
48 
52  public function getGuestTemplateId()
53  {
54  return $this->getConfigValue(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $this->getStore()->getStoreId());
55  }
56 
60  public function getTemplateId()
61  {
62  return $this->getConfigValue(self::XML_PATH_EMAIL_TEMPLATE, $this->getStore()->getStoreId());
63  }
64 
68  public function getEmailIdentity()
69  {
70  return $this->getConfigValue(self::XML_PATH_EMAIL_IDENTITY, $this->getStore()->getStoreId());
71  }
72 }