Definition at line 10 of file CaptchaFactory.php.
◆ __construct()
- Parameters
-
\Magento\Framework\ObjectManagerInterface | $objectManager | |
Definition at line 20 of file CaptchaFactory.php.
◆ create()
create |
( |
|
$captchaType, |
|
|
|
$formId |
|
) |
| |
Get captcha instance
- Parameters
-
string | $captchaType | |
string | $formId | |
- Returns
- \Magento\Captcha\Model\CaptchaInterface
- Exceptions
-
Definition at line 33 of file CaptchaFactory.php.
35 $className =
'Magento\Captcha\Model\\' . ucfirst($captchaType);
37 $instance = $this->_objectManager->create(
$className, [
'formId' => $formId]);
38 if (!$instance instanceof \
Magento\Captcha\Model\CaptchaInterface) {
39 throw new \InvalidArgumentException(
40 $className .
' does not implement \Magento\Captcha\Model\CaptchaInterface'
◆ $_objectManager
The documentation for this class was generated from the following file: