Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DefaultCaptcha.php
Go to the documentation of this file.
1 <?php
8 
12 class DefaultCaptcha extends \Magento\Captcha\Block\Captcha\DefaultCaptcha
13 {
17  protected $_url;
18 
22  protected $_config;
23 
31  public function __construct(
32  \Magento\Framework\View\Element\Template\Context $context,
33  \Magento\Captcha\Helper\Data $captchaData,
34  \Magento\Backend\Model\UrlInterface $url,
35  \Magento\Backend\App\ConfigInterface $config,
36  array $data = []
37  ) {
38  parent::__construct($context, $captchaData, $data);
39  $this->_url = $url;
40  $this->_config = $config;
41  }
42 
48  public function getRefreshUrl()
49  {
50  return $this->_url->getUrl(
51  'adminhtml/refresh/refresh',
52  ['_secure' => $this->_config->isSetFlag('web/secure/use_in_adminhtml'), '_nosecret' => true]
53  );
54  }
55 }
$config
Definition: fraud_order.php:17
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Captcha\Helper\Data $captchaData, \Magento\Backend\Model\UrlInterface $url, \Magento\Backend\App\ConfigInterface $config, array $data=[])