Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ShipmentIdentity.php
Go to the documentation of this file.
1 <?php
8 
10 {
14  const XML_PATH_EMAIL_COPY_METHOD = 'sales_email/shipment/copy_method';
15  const XML_PATH_EMAIL_COPY_TO = 'sales_email/shipment/copy_to';
16  const XML_PATH_EMAIL_IDENTITY = 'sales_email/shipment/identity';
17  const XML_PATH_EMAIL_GUEST_TEMPLATE = 'sales_email/shipment/guest_template';
18  const XML_PATH_EMAIL_TEMPLATE = 'sales_email/shipment/template';
19  const XML_PATH_EMAIL_ENABLED = 'sales_email/shipment/enabled';
20 
26  public function isEnabled()
27  {
28  return $this->scopeConfig->isSetFlag(
29  self::XML_PATH_EMAIL_ENABLED,
30  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
31  $this->getStore()->getStoreId()
32  );
33  }
34 
40  public function getEmailCopyTo()
41  {
42  $data = $this->getConfigValue(self::XML_PATH_EMAIL_COPY_TO, $this->getStore()->getStoreId());
43  if (!empty($data)) {
44  return explode(',', $data);
45  }
46  return false;
47  }
48 
54  public function getCopyMethod()
55  {
56  return $this->getConfigValue(self::XML_PATH_EMAIL_COPY_METHOD, $this->getStore()->getStoreId());
57  }
58 
64  public function getGuestTemplateId()
65  {
66  return $this->getConfigValue(self::XML_PATH_EMAIL_GUEST_TEMPLATE, $this->getStore()->getStoreId());
67  }
68 
74  public function getTemplateId()
75  {
76  return $this->getConfigValue(self::XML_PATH_EMAIL_TEMPLATE, $this->getStore()->getStoreId());
77  }
78 
84  public function getEmailIdentity()
85  {
86  return $this->getConfigValue(self::XML_PATH_EMAIL_IDENTITY, $this->getStore()->getStoreId());
87  }
88 }