%PDF- %PDF-scopeConfig = $scopeConfig; } /** * Get error * @return Phrase */ public function getErrorDescription() { return __('Incorrect reCAPTCHA'); } /** * Get google recaptcha public key * @return string */ public function getPublicKey() { return trim($this->scopeConfig->getValue(static::XML_PATH_PUBLIC_KEY, ScopeInterface::SCOPE_WEBSITE)); } /** * Get google recaptcha private key * @return string */ public function getPrivateKey() { return trim($this->scopeConfig->getValue(static::XML_PATH_PRIVATE_KEY, ScopeInterface::SCOPE_WEBSITE)); } /** * Return true if enabled on backend * @return bool */ public function isEnabledBackend() { if (!$this->getPrivateKey() || !$this->getPublicKey()) { return false; } return (bool) $this->scopeConfig->getValue(static::XML_PATH_ENABLED_BACKEND); } /** * Return true if enabled on frontend * @return bool */ public function isEnabledFrontend() { if (!$this->getPrivateKey() || !$this->getPublicKey()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend login * @return bool */ public function isEnabledFrontendLogin() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_LOGIN, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend forgot password * @return bool */ public function isEnabledFrontendForgot() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_FORGOT, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend contact * @return bool */ public function isEnabledFrontendContact() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_CONTACT, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend create user * @return bool */ public function isEnabledFrontendCreate() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_CREATE, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend review * @return bool */ public function isEnabledFrontendReview() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_REVIEW, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend newsletter * @return bool */ public function isEnabledFrontendNewsletter() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_NEWSLETTER, ScopeInterface::SCOPE_WEBSITE ); } /** * Return true if enabled on frontend send to friend * @return bool */ public function isEnabledFrontendSendFriend() { if (!$this->isEnabledFrontend()) { return false; } return (bool) $this->scopeConfig->getValue( static::XML_PATH_ENABLED_FRONTEND_SENDFRIEND, ScopeInterface::SCOPE_WEBSITE ); } /** * Get data size * @return string */ public function getFrontendSize() { if ($this->getFrontendType() === Type::TYPE_INVISIBLE) { return 'invisible'; } return $this->scopeConfig->getValue( static::XML_PATH_SIZE_FRONTEND, ScopeInterface::SCOPE_WEBSITE ); } /** * Get data size * @return string */ public function getBackendSize() { return $this->scopeConfig->getValue(static::XML_PATH_SIZE_BACKEND); } /** * Get data size * @return string */ public function getFrontendTheme() { if ($this->getFrontendType() === Type::TYPE_INVISIBLE) { return null; } return $this->scopeConfig->getValue( static::XML_PATH_THEME_FRONTEND, ScopeInterface::SCOPE_WEBSITE ); } /** * Get data size * @return string */ public function getBackendTheme() { return $this->scopeConfig->getValue(static::XML_PATH_THEME_BACKEND); } /** * Get data size * @return string */ public function getFrontendPosition() { if ($this->getFrontendType() !== Type::TYPE_INVISIBLE) { return null; } return $this->scopeConfig->getValue( static::XML_PATH_POSITION_FRONTEND, ScopeInterface::SCOPE_WEBSITE ); } /** * Get data size * @return string */ public function getFrontendType() { return $this->scopeConfig->getValue( static::XML_PATH_TYPE_FRONTEND, ScopeInterface::SCOPE_WEBSITE ); } /** * Get language code * @return string */ public function getLanguageCode() { return $this->scopeConfig->getValue( static::XML_PATH_LANGUAGE_CODE, ScopeInterface::SCOPE_STORE ); } }