Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
Data Class Reference
Inheritance diagram for Data:
AbstractHelper

Public Member Functions

 isEnabled ($store=null)
 
 isAllowForGuest ($store=null)
 
 getMaxRecipients ($store=null)
 
 getMaxEmailPerPeriod ($store=null)
 
 getPeriod ()
 
 getLimitBy ($store=null)
 
 getEmailTemplate ($store=null)
 
 getCookieName ()
 
- Public Member Functions inherited from AbstractHelper
 __construct (Context $context)
 
 isModuleOutputEnabled ($moduleName=null)
 

Data Fields

const XML_PATH_ENABLED = 'sendfriend/email/enabled'
 
const XML_PATH_ALLOW_FOR_GUEST = 'sendfriend/email/allow_guest'
 
const XML_PATH_MAX_RECIPIENTS = 'sendfriend/email/max_recipients'
 
const XML_PATH_MAX_PER_HOUR = 'sendfriend/email/max_per_hour'
 
const XML_PATH_LIMIT_BY = 'sendfriend/email/check_by'
 
const XML_PATH_EMAIL_TEMPLATE = 'sendfriend/email/template'
 
const COOKIE_NAME = 'stf'
 
const CHECK_IP = 1
 
const CHECK_COOKIE = 0
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHelper
 _getRequest ()
 
 _getModuleName ()
 
 _getUrl ($route, $params=[])
 
- Protected Attributes inherited from AbstractHelper
 $_moduleName
 
 $_request
 
 $_moduleManager
 
 $_logger
 
 $_urlBuilder
 
 $_httpHeader
 
 $_eventManager
 
 $_remoteAddress
 
 $urlEncoder
 
 $urlDecoder
 
 $scopeConfig
 
 $_cacheConfig
 

Detailed Description

SendFriend Data Helper

Author
Magento Core Team core@.nosp@m.mage.nosp@m.ntoco.nosp@m.mmer.nosp@m.ce.co.nosp@m.m

@api

Since
100.0.2

Definition at line 17 of file Data.php.

Member Function Documentation

◆ getCookieName()

getCookieName ( )

Retrieve Key Name for Cookie

See also
self::COOKIE_NAME
Returns
string

Definition at line 143 of file Data.php.

144  {
145  return self::COOKIE_NAME;
146  }

◆ getEmailTemplate()

getEmailTemplate (   $store = null)

Retrieve Email Template

Parameters
int$store
Returns
mixed

Definition at line 128 of file Data.php.

129  {
130  return $this->scopeConfig->getValue(
131  self::XML_PATH_EMAIL_TEMPLATE,
132  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
133  $store
134  );
135  }

◆ getLimitBy()

getLimitBy (   $store = null)

Retrieve Limit Sending By

Parameters
int$store
Returns
int

Definition at line 113 of file Data.php.

114  {
115  return (int)$this->scopeConfig->getValue(
116  self::XML_PATH_LIMIT_BY,
117  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
118  $store
119  );
120  }

◆ getMaxEmailPerPeriod()

getMaxEmailPerPeriod (   $store = null)

Retrieve Max Products Sent in 1 Hour

Parameters
int$store
Returns
int

Definition at line 88 of file Data.php.

89  {
90  return (int)$this->scopeConfig->getValue(
91  self::XML_PATH_MAX_PER_HOUR,
92  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
93  $store
94  );
95  }

◆ getMaxRecipients()

getMaxRecipients (   $store = null)

Retrieve Max Recipients

Parameters
int$store
Returns
int

Definition at line 73 of file Data.php.

74  {
75  return (int)$this->scopeConfig->getValue(
76  self::XML_PATH_MAX_RECIPIENTS,
77  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
78  $store
79  );
80  }

◆ getPeriod()

getPeriod ( )

Retrieve Limitation Period in seconds (1 hour)

Returns
int

Definition at line 102 of file Data.php.

103  {
104  return 3600;
105  }

◆ isAllowForGuest()

isAllowForGuest (   $store = null)

Check allow send email for guest

Parameters
int$store
Returns
bool

Definition at line 58 of file Data.php.

59  {
60  return $this->scopeConfig->isSetFlag(
61  self::XML_PATH_ALLOW_FOR_GUEST,
62  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
63  $store
64  );
65  }

◆ isEnabled()

isEnabled (   $store = null)

Check is enabled Module

Parameters
int$store
Returns
bool

Definition at line 43 of file Data.php.

44  {
45  return $this->scopeConfig->isSetFlag(
46  self::XML_PATH_ENABLED,
47  \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
48  $store
49  );
50  }

Field Documentation

◆ CHECK_COOKIE

const CHECK_COOKIE = 0

Definition at line 35 of file Data.php.

◆ CHECK_IP

const CHECK_IP = 1

Definition at line 33 of file Data.php.

◆ COOKIE_NAME

const COOKIE_NAME = 'stf'

Definition at line 31 of file Data.php.

◆ XML_PATH_ALLOW_FOR_GUEST

const XML_PATH_ALLOW_FOR_GUEST = 'sendfriend/email/allow_guest'

Definition at line 21 of file Data.php.

◆ XML_PATH_EMAIL_TEMPLATE

const XML_PATH_EMAIL_TEMPLATE = 'sendfriend/email/template'

Definition at line 29 of file Data.php.

◆ XML_PATH_ENABLED

const XML_PATH_ENABLED = 'sendfriend/email/enabled'

Definition at line 19 of file Data.php.

◆ XML_PATH_LIMIT_BY

const XML_PATH_LIMIT_BY = 'sendfriend/email/check_by'

Definition at line 27 of file Data.php.

◆ XML_PATH_MAX_PER_HOUR

const XML_PATH_MAX_PER_HOUR = 'sendfriend/email/max_per_hour'

Definition at line 25 of file Data.php.

◆ XML_PATH_MAX_RECIPIENTS

const XML_PATH_MAX_RECIPIENTS = 'sendfriend/email/max_recipients'

Definition at line 23 of file Data.php.


The documentation for this class was generated from the following file: