-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Expand file tree
/
Copy pathData.php
More file actions
59 lines (54 loc) · 1.67 KB
/
Data.php
File metadata and controls
59 lines (54 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Captcha helper for adminhtml area
*/
namespace Magento\Captcha\Helper\Adminhtml;
class Data extends \Magento\Captcha\Helper\Data
{
/**
* @var \Magento\Backend\App\ConfigInterface
*/
protected $_backendConfig;
/**
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Store\Model\StoreManager $storeManager
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Captcha\Model\CaptchaFactory $factory
* @param \Magento\Backend\App\ConfigInterface $backendConfig
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Store\Model\StoreManager $storeManager,
\Magento\Framework\Filesystem $filesystem,
\Magento\Captcha\Model\CaptchaFactory $factory,
\Magento\Backend\App\ConfigInterface $backendConfig
) {
$this->_backendConfig = $backendConfig;
parent::__construct($context, $storeManager, $filesystem, $factory);
}
/**
* Returns config value for admin captcha
*
* @param string $key The last part of XML_PATH_$area_CAPTCHA_ constant (case insensitive)
* @param \Magento\Store\Model\Store $store
* @return \Magento\Framework\App\Config\Element
*/
public function getConfig($key, $store = null)
{
return $this->_backendConfig->getValue('admin/captcha/' . $key);
}
/**
* Get website code
*
* @param mixed $website
* @return string
*/
protected function _getWebsiteCode($website = null)
{
return 'admin';
}
}