yii\captcha\CaptchaValidator::createCaptchaAction PHP Method

createCaptchaAction() public method

Creates the CAPTCHA action object from the route specified by [[captchaAction]].
public createCaptchaAction ( ) : CaptchaAction
return CaptchaAction the action object
    public function createCaptchaAction()
    {
        $ca = Yii::$app->createController($this->captchaAction);
        if ($ca !== false) {
            /* @var $controller \yii\base\Controller */
            list($controller, $actionID) = $ca;
            $action = $controller->createAction($actionID);
            if ($action !== null) {
                return $action;
            }
        }
        throw new InvalidConfigException('Invalid CAPTCHA action ID: ' . $this->captchaAction);
    }