81 parent::__construct($context);
92 if (!array_key_exists($formId, $this->_captcha)) {
93 $captchaType = ucfirst($this->
getConfig(
'type'));
96 }
elseif ($captchaType ==
'Default') {
97 $captchaType = $captchaType .
'Model';
100 $this->_captcha[$formId] = $this->_factory->create($captchaType, $formId);
102 return $this->_captcha[$formId];
114 return $this->scopeConfig->getValue(
115 'customer/captcha/' . $key,
116 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE,
135 foreach ($fontsConfig as $fontName => $fontConfig) {
136 $fonts[$fontName] = [
137 'label' => $fontConfig[
'label'],
138 'path' => $libDir->getAbsolutePath($fontConfig[
'path']),
155 $mediaDir->create($captchaDir);
156 return $mediaDir->getAbsolutePath($captchaDir) .
'/';
167 return $this->_storeManager->getWebsite(
$website)->getCode();
178 return $this->_storeManager->getStore()->getBaseUrl(
elseif(isset( $params[ 'redirect_parent']))
const DEFAULT_CAPTCHA_TYPE
__construct(\Magento\Framework\App\Helper\Context $context, \Magento\Store\Model\StoreManagerInterface $storeManager, Filesystem $filesystem, \Magento\Captcha\Model\CaptchaFactory $factory)
const XML_PATH_CAPTCHA_FONTS
const INPUT_NAME_FIELD_VALUE
getConfig($key, $store=null)
_getWebsiteCode($website=null)