Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
OrderIdentity.php
Go to the documentation of this file.
1 <?php
7 
8 class OrderIdentity extends Container implements IdentityInterface
9 {
13  const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/order/copy_method';
14  const XML_PATH_EMAIL_COPY_TO = 'sales_email/order/copy_to';
15  const XML_PATH_EMAIL_IDENTITY = 'sales_email/order/identity';
16  const XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/order/guest_template';
17  const XML_PATH_EMAIL_TEMPLATE = 'sales_email/order/template';
18  const XML_PATH_EMAIL_ENABLED = 'sales_email/order/enabled';
19 
23  public function isEnabled()
24  {
25  return $this->scopeConfig->isSetFlag(
26  self::XML_PATH_EMAIL_ENABLED,
27  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
28  $this->getStore()->getStoreId()
29  );
30  }
31 
37  public function getEmailCopyTo()
38  {
39  $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());
40  if (!empty($data)) {
41  return explode(',', $data);
42  }
43  return false;
44  }
45 
51  public function getCopyMethod()
52  {
53  return $this->getConfigValue(self::XML_PATH_EMAIL_COPY_METHOD, $this->getStore()->getStoreId());
54  }
55 
61  public function getGuestTemplateId()
62  {
63  return $this->getConfigValue(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $this->getStore()->getStoreId());
64  }
65 
71  public function getTemplateId()
72  {
73  return $this->getConfigValue(self::XML_PATH_EMAIL_TEMPLATE, $this->getStore()->getStoreId());
74  }
75 
81  public function getEmailIdentity()
82  {
83  return $this->getConfigValue(self::XML_PATH_EMAIL_IDENTITY, $this->getStore()->getStoreId());
84  }
85 }