configInterface = $configInterface; parent::__construct($context); } /** * @param null $scopeCode * @return bool */ public function isCustomerSyncingEnabled($scopeCode = null) { return $this->scopeConfig->isSetFlag( self::ACTIVE_CAMPAIGN_CUSTOMER_SYNC, ScopeInterface::SCOPE_STORES, $scopeCode ); } /** * @param null $scopeCode * @return mixed */ public function getCronTime($scopeCode = null) { return $this->scopeConfig->getValue( CronConfig::CRON_MODEL_PATH, ScopeInterface::SCOPE_STORES, $scopeCode ); } /** * @param null $scopeCode * @return mixed */ public function getNumberOfCustomers($scopeCode = null) { return $this->scopeConfig->getValue( self::ACTIVE_CAMPAIGN_CUSTOMER_NUMBER_OF_CUSTOMERS, ScopeInterface::SCOPE_STORES, $scopeCode ); } public function getLastCustomerUpdateSync($scopeCode = null) { return $this->scopeConfig->getValue( self::ACTIVE_CAMPAIGN_CUSTOMER_UPDATE_LAST_SYNC, ScopeInterface::SCOPE_STORES, $scopeCode ); } public function setLastCustomerUpdateSync($date, $scopeCode = null) { $scope = \Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT; $this->configInterface->saveConfig(self::ACTIVE_CAMPAIGN_CUSTOMER_UPDATE_LAST_SYNC, $date, $scope); } }