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

Public Member Functions

 __construct (\Magento\Framework\App\Helper\Context $context, \Magento\GoogleAnalytics\Helper\Data $analyticsHelper)
 
 isGoogleExperimentEnabled ($store=null)
 
 isGoogleExperimentActive ($store=null)
 
- Public Member Functions inherited from AbstractHelper
 __construct (Context $context)
 
 isModuleOutputEnabled ($moduleName=null)
 

Data Fields

const XML_PATH_ENABLED = 'google/analytics/experiments'
 

Protected Attributes

 $_activeForCmsFlag
 
 $_analyticsHelper
 
- Protected Attributes inherited from AbstractHelper
 $_moduleName
 
 $_request
 
 $_moduleManager
 
 $_logger
 
 $_urlBuilder
 
 $_httpHeader
 
 $_eventManager
 
 $_remoteAddress
 
 $urlEncoder
 
 $urlDecoder
 
 $scopeConfig
 
 $_cacheConfig
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractHelper
 _getRequest ()
 
 _getModuleName ()
 
 _getUrl ($route, $params=[])
 

Detailed Description

@api

Since
100.0.2

Definition at line 17 of file Data.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Framework\App\Helper\Context  $context,
\Magento\GoogleAnalytics\Helper\Data  $analyticsHelper 
)
Parameters
\Magento\Framework\App\Helper\Context$context
\Magento\GoogleAnalytics\Helper\Data$analyticsHelper

Definition at line 38 of file Data.php.

41  {
42  $this->_analyticsHelper = $analyticsHelper;
43  parent::__construct($context);
44  }

Member Function Documentation

◆ isGoogleExperimentActive()

isGoogleExperimentActive (   $store = null)

Checks if Google Experiment is active

Parameters
string$store
Returns
bool

Definition at line 63 of file Data.php.

64  {
65  return $this->isGoogleExperimentEnabled($store) && $this->_analyticsHelper->isGoogleAnalyticsAvailable($store);
66  }
isGoogleExperimentEnabled($store=null)
Definition: Data.php:52

◆ isGoogleExperimentEnabled()

isGoogleExperimentEnabled (   $store = null)

Checks if Google Experiment is enabled

Parameters
string$store
Returns
bool

Definition at line 52 of file Data.php.

53  {
54  return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED, ScopeInterface::SCOPE_STORE, $store);
55  }

Field Documentation

◆ $_activeForCmsFlag

$_activeForCmsFlag
protected

Definition at line 27 of file Data.php.

◆ $_analyticsHelper

$_analyticsHelper
protected

Definition at line 32 of file Data.php.

◆ XML_PATH_ENABLED

const XML_PATH_ENABLED = 'google/analytics/experiments'

Xml path google experiments enabled

Definition at line 22 of file Data.php.


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